Title: Excluding pages
Last modified: August 20, 2016

---

# Excluding pages

 *  [erinallen](https://wordpress.org/support/users/erinallen/)
 * (@erinallen)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/excluding-pages-4/)
 * 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/](http://wordpress.org/extend/plugins/daves-wordpress-live-search/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [filmcaptures](https://wordpress.org/support/users/filmcaptures/)
 * (@filmcaptures)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/excluding-pages-4/#post-3616802)
 * Did you happen to figure out a solution? I’m also interested in excluding pages
   from search results.
 *  [hopechange](https://wordpress.org/support/users/hopechange/)
 * (@hopechange)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/excluding-pages-4/#post-3616806)
 * me too!
 *  Thread Starter [erinallen](https://wordpress.org/support/users/erinallen/)
 * (@erinallen)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/excluding-pages-4/#post-3616807)
 * 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
 *  [Patzman](https://wordpress.org/support/users/patzman/)
 * (@patzman)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/excluding-pages-4/#post-3616827)
 * You can do this with relevanssi: [http://wordpress.org/plugins/relevanssi/](http://wordpress.org/plugins/relevanssi/)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Excluding pages’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/daves-wordpress-live-search_daad6f.
   svg)
 * [Dave's WordPress Live Search](https://wordpress.org/plugins/daves-wordpress-live-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/daves-wordpress-live-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/daves-wordpress-live-search/)
 * [Active Topics](https://wordpress.org/support/plugin/daves-wordpress-live-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/daves-wordpress-live-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/daves-wordpress-live-search/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Patzman](https://wordpress.org/support/users/patzman/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/excluding-pages-4/#post-3616827)
 * Status: not resolved