Support » Plugin: Dave's WordPress Live Search » Excluding pages

  • Hi – wondering if there’s any way at all to exclude particular pages from the display? I didn’t have any luck using relevanssi or any of the other plugins mentioned, so tried doing this in the functions file, but the results are still showing the excluded pages (though it’s working when I just use the search function without this plugin) – is there anything else I can try?

    `// search filter
    function fb_search_filter($query) {

    if ( !$query->is_admin && $query->is_search) {
    $query->set(‘post__not_in’, array(65, 696, 817) ); // id of page or post
    }

    return $query;
    }
    add_filter( ‘pre_get_posts’, ‘fb_search_filter’ );`

    OR – does anyone know of a css style-able live search plugin like this that DOES work with excluding pages? I really want to use this one since it’s been such a breeze to set up, but we really need to hide our email signup confirmation pages from the search.

    Thanks!

    http://wordpress.org/extend/plugins/daves-wordpress-live-search/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you happen to figure out a solution? I’m also interested in excluding pages from search results.

    me too!

    Thread Starter erinallen

    (@erinallen)

    Hey guys –

    I actually ended up creating a “do not show” category, and then modifying the search query in the plugin itself to exclude that category, since it wasn’t picking up my settings from Relevanssi – BUT – it looks like new version of this plugin does pick up those settings – so I’d try it in combination with Relevanssi and use the exclude features in that plugin. It seems to be working with the update I just did.

    Hope that helps!
    Erin

    You can do this with relevanssi: http://wordpress.org/plugins/relevanssi/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Excluding pages’ is closed to new replies.