show only indexable vyb yoast pages in wordpress search
function custom_search_query( $query ) { if ( $query->is_search ) { $query->set('post_type', array('post', 'page', 'custom_post_type_1', 'custom_post_type_2')); } return $query; } add_filter('pre_get_posts','custom_search_query');