/*
 Theme Name:   Travel Tour Child
 Theme URI:    http://demo.goodlayers.com/infinite
 Description:  Goodlayers Travel Tour Child Theme
 Author:       Goodlayers
 Author URI:   http://goodlayers.com
 Template:     traveltour
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, right-sidebar, responsive-layout
 Text Domain:  traveltour-child

 START YOUR CHILD THEME CSS HERE
*/

//search only in tours post type
function custom_search_filter_tour($query) {
    if (!is_admin() && $query->is_main_query() && $query->is_search()) {
        // Only search in 'tour' post type
        $query->set('post_type', 'tour');
    }
}
add_action('pre_get_posts', 'custom_search_filter_tour');