Is there any way to exclude a page / post / category / portfolio from the magnifying glass search at the end of the menu bar?
Hey rodpascoe!
You can us SearchWP to exclude entries from the search index. Also see: https://kriesi.at/support/topic/search-function-3/
Cheers!
Peter
Hi Dude, I had the same question as rodpascoe, above.
I installed the Relevanssi plugin and entered a comma separated list of page IDs I wish to exclude from the search.
I also added the code to functions.php as directed in the second link above.
However, the pages I wish to exclude from the search still display in the ajax search. (They don’t display in the full search.)
Have I missed something?
Cheers,
Mike
Hi!
See: http://kriesi.at/documentation/enfold/use-relevanssi-in-search-instead-of-the-default-search/
Regards,
Devin
Hi Devin, yes that’s the code mentioned in the second of Dude’s link, and I’ve already added that to the functions.php.
Mike
Hi!
I didn’t test it but you can try to manipulate the query vars variable. Replace
$tempquery->query_vars = $search_parameters;
with
$tempquery->query_vars = $search_parameters;
$tempquery->query_vars['post__not_in'] = array(20,34,50);
and instead of 20,34,50 insert the page id(s) you want to exclude.
Regards,
Peter
Hi There – Just ran across this issue myself and found this handy plugin: http://wordpress.org/plugins/search-exclude/
Works like a charm for me!
Hey!
Great :)
Cheers!
Peter