WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Limit search to taxonomy term (2 posts)

  1. JsonB123
    Member
    Posted 1 year ago #

    I'm searching within custom post types and Relevanssi is mostly working...except that I cannot limit my search to a specific taxonomy term.

    I know what I'm doing works because when I disable Relevanssi, the search results return as expected (but I need Relevanssi to search on the other meta fields, so that's why I'm using it).

    Anyway, I tried using both a hidden field in my search form and pre_get_posts filter to update the tax_query but it's just not working. I can provide code if needed; just checking if this is possible or if Relevanssi will always override any modification I do to the query. Is there a filter I can run that will execute after Relevanssi does it's thing so I can filter it further if necessary?

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    Relevanssi doesn't currently support tax_query at all, I'm at the moment rewriting the taxonomy code to work with tax_query.

    http://www.example.com/?s=term&taxonomy=yourtaxonomy&taxonomy_term=yourtaxonomyterm

    should work, though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic