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

    (@msaari)

    You have two options here.

    • Relevanssi Live Ajax Search reads the search parameters from the search form. Add a post_type parameter set to product in your search form, and Relevanssi Live Ajax Search will respect that.
    • If you only want the search to return products and never the other post types, set Relevanssi to only index the products.
    Thread Starter Rbkhrlstn

    (@rbkhrlstn)

    Thanks Mikko,

    The theme support doesn’t seem to know how to add the post type parameter to the form.

    How do I set it to only index products? It has no in the exclude from search for posts and pages. I don’t see a way of doing that. Is that a premium feature?

    Plugin Author Mikko Saari

    (@msaari)

    The Settings > Relevanssi > Indexing page starts with a list of post types to index. Uncheck everything but product and rebuild the index.

    Since you’re using FacetWP, you likely add the post type parameter to the form from FacetWP. It looks like this:

    <input type="hidden" name="post_type" value="product" />
    Thread Starter Rbkhrlstn

    (@rbkhrlstn)

    Thank you, Mikko! I appreciate your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post Type in query string’ is closed to new replies.