Exclude post category in a blog page
In your functions.php file, use pre_get_posts and swap out the -1 in the following code with the category I.D you want to exclude from your posts page. function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( ‘cat’, ‘-1’ ); } } add_action( ‘pre_get_posts’, ‘exclude_category’ );