This topic has 6 replies, 2 voices, and was last updated 9 years by viadsworld.
-
Author
Tagged: results, search, remove, search results
-
June 27, 2015 at 05:33 #65192viadsworldParticipant
Hi,
I would also love to limit my search results to products, members, post and if easily specific pages specific pages.
or
How can I remove pages from search results entirely?
Returning results display 404, contact and other template pages in the results, which is confusing and a risk.
How can I make this changes asap.
appreciation in advance.
June 27, 2015 at 05:35 #65193viadsworldParticipantscreenshot
Attachments:
You must be logged in to view attached files.June 27, 2015 at 16:14 #65232sharmstrModeratorTry this in your childs functions.php file. Change 30 and 1081 to the page ids you want to exclude.
COPY CODEfunction exclude_single_posts_home($query) { if ($query->is_main_query()) { $query->set('post__not_in', array(30,1081)); } } add_action('pre_get_posts', 'exclude_single_posts_home');
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
July 23, 2015 at 21:20 #69708viadsworldParticipantsorry just created a nother post for this topic I forgot we post this question.
How can we remove all pages from search results?
July 24, 2015 at 12:41 #69774sharmstrModeratorThis is not Kleo specific. Googling came up with these possiblities
https://wordpress.org/plugins/search-exclude/
http://www.wpbeginner.com/wp-tutorials/how-to-exclude-pages-from-wordpress-search-results/
http://wordpress.stackexchange.com/questions/142811/exclude-pages-from-wordpress-search-result-pageHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
September 14, 2015 at 07:22 #77490viadsworldParticipantactually theres was one issue – even though this removes pages from search. it also removes page from the site all together, even on the admin side.
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.