excluding certain pages from search

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 Ernest Marcinko 7 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12455
    synergy
    synergy
    Participant

    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.

    #12457
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #12458
    synergy
    synergy
    Participant

    Hi 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.

    #12459
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Based 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12464
    synergy
    synergy
    Participant

    Hi Ernest,

    I tried the category plugin and everything works fine now.

    Many thanks.

    #12466
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘excluding certain pages from search’ is closed to new replies.