How to get all post except particular category without breaking the paging
I would filter pre_get_posts. Perhaps like so, though you may need to tweak the conditional a bit: function wpse71508_filter_pre_get_posts( $query ) { if ( is_main_query() ) { if ( is_home() || is_archive() ) { $query->set( ‘cat’, ‘-22’ ); } } return $query; } add_action( ‘pre_get_posts’, ‘wpse71508_filter_pre_get_posts’ ); If you could clarify the context (rather than … Read more