Forums › Forums › Search & Filter Pro › Custom Post Type search does not work
Tagged: custom post types
- This topic has 4 replies, 2 voices, and was last updated 8 years, 11 months ago by
Trevor.
-
Anonymous(Private) April 20, 2017 at 12:56 pm #104018
I have page with search results where I placed shortcode. Creating it I checked in setting meta-box in field “Search in the following post types” one of my custom post types called “Knowledge base”.
I also set some custom taxonomies and search field in “Search Form UI” box.
So when I go to this search results page (without search key) I get list of all posts “Knowledge base” type. This is all good! Also no problem if I add in filters some taxonmies.
But if I add serch key I get results FROM ALL POST TYPES that have on site….. I’m confued…. How this may be? What to do to fix ths?Thanks!
Trevor(Private) April 20, 2017 at 3:01 pm #104042This should not be necessary. However, your search is a textual search, and the WordPress default action is to search only Title and Content, and not taxonomies and custom fields. If you add the free Relevanssi plugin and tell it to index the taxonomies or custom fields you want, and then enable support in the advanced tab of Search & Filter form setup, it should work. See here for documentation.
Your theme may also be causing issues, but I would have to take a more detailed look in the admin to identify that.
-
AuthorPosts