Is it possible to filter the main loop to exclude posts from a specific category?
You still are going to make use of pre_get_posts to alter the main query query vars before the main query actually runs. The blog page/homepage can be targeted with the is_home() conditional tag add_action( ‘pre_get_posts’, function ( $q ) { if ( is_home() // Only targets the home/blog page && $q->is_main_query() // Only targets the … Read more