Relevanssi - A Better Search
How to restrict search to custom field value (3 posts)

  1. Simon Blackbourn
    Posted 5 years ago #


    Following on from my previous post: http://wordpress.org/support/topic/plugin-relevanssi-a-better-search-is-it-possible-to-restrict-to-custom-field-or-taxonomy-term

    With v1.4 can I now restrict a search to a particular custom field? e.g. I have a 'reviewer' custom field, so I want to only search this field, not the post content/title.


  2. Mikko Saari
    Plugin Author

    Posted 5 years ago #

    No, it doesn't work like that...

    You can restrict search results to posts that either have certain custom field present (have a reviewer) or have a certain value for the custom field (have a certain reviewer), but you can't have Relevanssi search the custom fields only.

    With the way Relevanssi works, searching only for custom field content is possible, but restricting it to a certain custom field gets a bit tricky, as the index only has a column for "custom field", not each and every custom field.

  3. Simon Blackbourn
    Posted 5 years ago #

    Thanks for the explanation: I've actually realised I was unnecessarily overcomplicating things anyway - as so often, the simplest solution is best!

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