Forums › Forums › Search & Filter Pro › how to search into custom post type taxonomy
- This topic has 12 replies, 2 voices, and was last updated 8 years, 10 months ago by
Trevor.
-
Anonymous(Private) December 29, 2016 at 9:52 am #79080
Sorry Trevor, hurry’s worst friend in this case. 🙂
The page you can view is the following:
http://ww2.livinginvicenza.com/v1/events/
Now I set up the form like this:- a text search field
- a selection of events categories
- a selection of events locations
What I expect is that your plugin will search and filter results for instance like this:
if I search for “Concert” or I pick a category like “Concerts” I will have to see only 1 results. Not all the events!
How can it be possible? What’s wrong with my form?Trevor(Private) December 29, 2016 at 10:01 am #79082A text search in WordPress will only ever search the main text of a post and its title. If you add the relevanssi plugin, that can be setup to search taxonomies (one of the settings fields allows you to do this) and you can use our advanced settings to use Relevanssi once you have installed it.
As to the search using the dropdown, your theme may be overriding the search. If nothing you try in any field works, this may be the case. Directory Plus is not a theme I am familiar with. If you set up a test results page and use our shortcode method, this is a good way to see if this is the case.
Whilst the results may not look ‘good’ the template is editable and thus looks can be modified and improved. The template is basic to provide a common base for most themes to be built upon by you.
Anonymous(Private) December 29, 2016 at 10:06 am #79084Thanks for your reply Trevor.
I created a test page with a shortcode here: http://ww2.livinginvicenza.com/v1/search-test/
I installed and activated Relevanssi.
Results are the same.
What does it mean? That’s an issue related to the theme?Trevor(Private) December 29, 2016 at 10:20 am #79086You need to make a duplicate search form and set it to the Shortcode method, set it to use the same page as the shortcode is on (the results URL) and make sure that the page you make has both the form and results shortcodes on.
You did not setup Relevanssi. It was not set to search in ait-event-pro CPT and it was not set up to search in the locations taxonomy. I have ticked them both now and re-built the relevanssi index.
Anonymous(Private) December 29, 2016 at 11:00 am #79095Hi Trevor, thanks once again for your reply.
Setting form as a shortcode I finally get what I need, I think…
You can see results here now: http://ww2.livinginvicenza.com/v1/events/
Can you confirm that it works now?Last question about styling results:
as you can see from the attached screenshot, is it possible for you to add a class to the div that includes post’s details? I am afraid if I will edit results.php I will loose any change with updates. Any functions.php tweak? Any hint?

-
AuthorPosts