WordPress.org

Support

Support » Plugins and Hacks » Ajaxy Live Search » [Plugin: Ajaxy Live Search] Hide specific page results from Live Search

[Plugin: Ajaxy Live Search] Hide specific page results from Live Search

  • I just want to hide specific pages by ID or Page Name from the live search. I can do it fine on the search results page using something like the following in my functions.php:

    //------------------------Exclude Pages From Search
    function SearchFilter($query) {
        if ($query->is_search) {
    
            $exclude = '1348,1346';
            $query->set('post__not_in', explode(",", $exclude));
        }
        return $query;
    }
    
    add_filter('pre_get_posts','SearchFilter');

    But it doesn’t look like ajaxy is using the WP search queries for it’s live search. Any suggestions for hooks into the plugin or anything WITHOUT manually adjusting the plugin itself?

    http://wordpress.org/extend/plugins/ajaxy-search-form/

  • The topic ‘[Plugin: Ajaxy Live Search] Hide specific page results from Live Search’ is closed to new replies.
Skip to toolbar