Forums › Forums › Search & Filter Pro › Search within post meta
Tagged: custom fields, post meta
- This topic has 2 replies, 2 voices, and was last updated 5 years, 11 months ago by Anonymous.
-
Anonymous(Private) December 20, 2018 at 10:04 pm #197235
I wondered if it’s possible for a search to include specific parts of the post meta.
I have a client who has unique identifiers for each of their various products, and that’s always saved in the same place. However, if I do a search through a normal SFP search field, say, for M15 (one of his identifiers), I can’t get that item to come up. It will, however, come up if I search for “Permian,” as that word is part of the post title.
Any thoughts as to whether that’s possible?
Here’s an SFPro search page which should find M15 when you search for “Permian”:
http://geoart.local/schematic-categories/onshore/Here’s the shortcut using the global search which finds it:
http://geoart.local/?s=m15Trevor(Private) December 21, 2018 at 9:28 am #197274Assuming that the search field is within a Search & Filter form, our plugin does not directly allow you to do text searches of individual Post Meta and Taxonomy data/terms. The Search & Filter Pro Text Search field uses the standard WordPress search, so looks only in the Post Title and Content. To help you control this better, on the form’s Advanced settings tab you will see 2 settings for Relevanssi.
The documentation for this is here:
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/relevanssi/
You would need to install and activate the free Relevanssi plugin as well.
Then set it up and build its index (make sure it is indexing the desired post types AND the taxonomies/custom fields that you want to search).
NOTE: WordPress generally does not search for stings of less than 3 characters, so in Relevanssi, I think there is a setting for minimum key phrase length.
-
AuthorPosts