Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › excluding certain pages from search
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 1 month ago.
- AuthorPosts
- March 24, 2017 at 12:31 pm #12455
Hi 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 #12457Hi,
On the Advanced Options -> Exclude reults panel you can actually exclude specific pages as well: https://i.imgur.com/8kR6fHI.png
That should do the trick for you.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 24, 2017 at 1:36 pm #12458Hi 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 #12459Based 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/
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 24, 2017 at 3:45 pm #12464Hi Ernest,
I tried the category plugin and everything works fine now.
Many thanks.
March 24, 2017 at 4:22 pm #12466You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘excluding certain pages from search’ is closed to new replies.