Reply 223810 to: Default Search Forms

Avatar: pablostevens
pablostevens
Participant
October 24, 2019 at 23:05

Ok found this in theme-functions.php

// **********************************************************************//
// ! Add page to search results
// **********************************************************************//
add_filter( 'pre_get_posts', 'et_search_filter' );
if ( !function_exists('et_search_filter') ) {
    function et_search_filter( $query ) {
        if ( ! is_admin() ) {
            if ( isset($query->query['post_type']) ) {
                if ( $query->is_search && $query->query['post_type'] == 'post') {
                    $query->set( 'post_type', array( 'post', 'page' , 'industries', 'wpsl_stores' ) );
                }
            }
            return $query;
        }
    }
}

I added my two custom post types here “industries” and “wpsl_stores”

I just added this to the functions.php of the child theme.

Sorry answered my own questions, but if someone else has the problem, this is the solution.

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.