Support » Plugin: Relevanssi - A Better Search » Relevanssi Search – Exclude the Single Post Type While Including its Taxonomy

  • Resolved InHouse


    Hello, I’m trying to exclude single FoxyShop products post type from search while including the taxonomies/categories of the same post type. Currently I can exclude the post type but I cannot get the taxonomies to be found. I am using a custom field from ACF for the taxonomy and they are not being indexed/searched. Details are below. If anyone can help with this, I’d greatly appreciate it.

    Post Type: foxyshop_product
    Taxonomy: foxyshop_categories
    Exclude from Search: foxyshop_products
    Include in Search: category_description custom field for foxyshop_categories taxonomy

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari


    Basic Relevanssi doesn’t find taxonomy terms; you need Relevanssi Premium for that.

    I’m not sure what the custom fields have to do with this, but custom fields are related to posts, and if you’re blocking the posts from the search, you won’t find anything with the custom fields – as they would return the post the custom field is related to.

    Ok, let’s say I purchase the premium plugin. Is there a way to hide the single post types from displaying in search results while still indexing the taxonomies? Or am I better off with some kind of redirect that redirects from a single post type to the parent category?

    Ah, I found a workaround to this. I added a class to my search results container for the single post type results. This allows me to hide them from view so the visitor doesn’t ever see the single post types but they can find the post categories once we buy Relevanssi Premium. Should happen early next week. Thanks for your help.

    Plugin Author Mikko Saari


    Also, you can use relevanssi_hits_filter to process the search results and remove anything you don’t want to appear in the results.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Relevanssi Search – Exclude the Single Post Type While Including its Taxonomy’ is closed to new replies.