The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Relevanssi - A Better Search
[resolved] Relevanssi Search - Exclude the Single Post Type While Including its Taxonomy (5 posts)

  1. InHouse
    Posted 2 years ago #

    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


  2. Mikko Saari
    Plugin Author

    Posted 2 years ago #

    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.

  3. InHouse
    Posted 2 years ago #

    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?

  4. InHouse
    Posted 2 years ago #

    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.

  5. Mikko Saari
    Plugin Author

    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic