WordPress.org

Support

Support » How-To and Troubleshooting » remove a category from the post count

remove a category from the post count

  • hello, i would like to remove a category from the post count

    so by example, posts under the asides category are not counted, but they are still being showned

    i have fount this code on zeo

    function myFilter($query) {
    	if ($query->is_feed) {
    		$query->set('cat','-5');
    	}
    
    return $query;
    }
    
    add_filter('pre_get_posts','myFilter');

    but i want them to still be printed… thanks

    using 2.1.2 without any php skillz 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘remove a category from the post count’ is closed to new replies.