Forums › Forums › Search & Filter Pro › Search in custom fields
Tagged: custom fields
- This topic has 3 replies, 2 voices, and was last updated 3 years, 12 months ago by Trevor.
-
Anonymous(Private) December 2, 2020 at 2:51 pm #268528
I’ve created a result page that shows only results of one special custom post type. The search works. On the custom post type pages I show content that is generated by the custom post type and by custom fields. The problem is now that the content inside the custom fields is not searchable. I’ve tried to change this by adding customs fields to the searchable post types. The problem is now that the custom post types appear as results which is not my intention. Only the custom post type pages should show up here. Is there any way make the custom fields searchable in the above mentioned way?
Trevor(Private) December 2, 2020 at 2:52 pm #268529Our plugin does not directly allow you to do text searches of individual Post Meta (custom fields) and Taxonomy (Category, Tags and Taxonomies) 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 Relevanssi up and build its index (make sure it is indexing the desired post types, custom fields AND any taxonomy that you want to search).
-
AuthorPosts