You can add the above to a functions plugin or into your WordPress theme's functions.php file.
Change the array( 148, 242 )
to match the post IDs of the events you want to hide.
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function ee_filter_pre_get_posts( $query ) { | |
if ( ! is_singular() && $query->is_main_query() ) { | |
$query->set( 'post__not_in', array( 148, 242 ) ); | |
} | |
} | |
add_action( 'pre_get_posts', 'ee_filter_pre_get_posts' ); |
You can add the above to a functions plugin or into your WordPress theme's functions.php file.
Change the array( 148, 242 )
to match the post IDs of the events you want to hide.