Plugin Support
Karan
(@kjswp)
Hi @hydn, if you are using the Live Ajax Search without the main SearchWP plugin then the search will be run using the default WordPress query_posts.
You can use the following filter hook to customize the query_posts arguments and exclude pages by IDs. You can add this hook to your theme functions.php file.
add_filter( 'searchwp_live_search_query_args', function( $args ) {
$args['post__not_in'] = [1, 2, 3]; // List all posts IDs that should be excluded from the search.
return $args;
} );