bp_search_override_wp_native_results( mixed $template )

Force native wp search section to load page template so we can hook stuff into it.

Description

Parameters

$template

(Required)

Return

(mixed)

Source

File: bp-search/bp-search-filters.php

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
function bp_search_override_wp_native_results( $template ) {
 
    if ( bp_search_is_search() ) { //if search page.
 
 
        $live_template = locate_template( array(
            'buddyboss-global-search.php',
            'page.php',
            'single.php',
            'index.php'
        ) );
 
        if ( '' != $live_template ) {
            return $live_template;
        }
 
    }
 
    return $template;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.