Tagged: ajax search
Is it possible to hide certain pages from the ajax search results?
Please let me know if it is and how this can be achieved.
You are going to need to use a more advanced search plugin for such feature.
You can try using SearchWP plugin ( you can find implementation here – http://kriesi.at/documentation/enfold/use-searchwp-instead-of-the-standard-search/ ) or Relevanssi plugin ( implementation here – http://kriesi.at/documentation/enfold/use-relevanssi-in-search-instead-of-the-default-search/ )
Try opening up /enfold/functions-enfold.php and change line 97 from this.
$defaults = array('numberposts' => 5, 'post_type' => 'any', 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false);
$defaults = array( 'post__not_in' => array( 1, 2, 3 ), 'numberposts' => 5, 'post_type' => 'any', 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false);
And change 1, 2, 3 to the IDs of the pages you want to exclude.
EDIT: Oops, looks like we replied at the same time.
The topic ‘Hide certain pages from Ajax search.’ is closed to new replies.