Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › excluding certain pages from search
- This topic has 5 replies, 2 voices, and was last updated 9 years, 2 months ago by
Ernest Marcinko.
-
AuthorPosts
-
March 24, 2017 at 12:31 pm #12455
synergy
ParticipantHi Guys,
I need to exclude certain pages from the search results.
I’m building a site that will have 2 types of members; buyers and suppliers. Only the buyers will use the search plugin. The suppliers will have 2 pages; a public profile page that buyers will be able to see and a private suppliers page that I do not want the buyers to find.
I’ve tried putting ‘sup-home-page’ as an additional tag in the Ajax Search Pro page settings and using that in the ‘exclude posts by tag’ option but the search produced ‘no tags found for this result’.
I know that I can use the Yoast plugin to hide these private pages from search engines but what would be the best way to exclude this private suppliers page from the search results?
Thanks in advance.
March 24, 2017 at 1:11 pm #12457Ernest Marcinko
KeymasterHi,
On the Advanced Options -> Exclude reults panel you can actually exclude specific pages as well: http://i.imgur.com/8kR6fHI.png
That should do the trick for you.
March 24, 2017 at 1:36 pm #12458synergy
ParticipantHi Ernest,
Thanks for the quick response.
As this site may end up with a large number of suppliers I was looking for an automatic exclusion method based on something like a tag that could be added to these private pages.
Is there any other way of excluding specific pages?
Thanks again.
March 24, 2017 at 1:41 pm #12459Ernest Marcinko
KeymasterBased on your description I thought you meant only one page each, I’m sorry.
In this case indeed excluding by tag or category is the best option. The issue is that pages in WordPress does not have taxonomies by default, so no post tags, no categories. The input field below the page is to add extra tags to search for, but those are not the classic post tags.
To resolve that, I would suggest trying this plugin: https://wordpress.org/plugins-wp/add-category-to-pages/
This should allow adding categories or tags to pages. I would probably create a category, place the pages I want to exclude inside of it, then exclude that category. That should hopefully do the trick.March 24, 2017 at 3:45 pm #12464synergy
ParticipantHi Ernest,
I tried the category plugin and everything works fine now.
Many thanks.
March 24, 2017 at 4:22 pm #12466Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- The topic ‘excluding certain pages from search’ is closed to new replies.