Wordpress Exclude Categories Posts but retain Post Count per page?

The easiest (but not most efficient) way to do this is to replace the global $wp_query by a custom query using category__in.

The easiest (but not most efficient) way to do this is to replace the global $wp_query by a custom query using category__in... global $wp_query; $wp_query = new WP_Query(array("category__in"=>array(4,5,6,7,8,9,10,11))); ...then do the loop... while (have_posts()){ the_post(); //etc.. } This will make the paging accurate, and you can rely on the high-level templating functions like next_posts_link(). Probably a more efficient way (that doesn't throw out and replace $wp_query) would be to mess with the original query before it's executed... add_action('parse_query', 'my_parse_query'); function my_parse_query(&$q){ //decide if you want to mess with the query.... //if not, return $q->set_query_var("category__in", array(4,5,6,7,8,9,10,11)); } my_parse_query would be called on every query, including those for pages and single posts, so you would have to add some logic to the function to only add category__in where it made sense.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions