Hi there,
We have a couple of sites that are smaller versions of our much larger site. The focusing on just one area.
So the search bar at the top of this page:
hidden link
Is no longer working as we would like.
Is it possible to have two taxonomies in one search drop down...in the case Destination?
Currently the legacy View (see pic aa1) has taxonomy="area"
From our main site we had some custom code so we could 'choose' what was displayed here (see pic aa2)
This I have tried to add how I would like this:
$args['slug'] = array(
'lake-district',
'windermere-lake-district',
'coniston-lake-district',
'ullswater-lake-district',
'cartmel-cumbria',
);
The top one 'lake-district',
is the only AREA taxonomy.
The rest are a LOCATION taxonomy.
Is there a way of combining these two taxonomies so they are available in the list order I've shown? (see pic aa2)
I've tried random things however nothing works.
Worth an ask. Thank you.
Hello,
I assume you are going to merge two taxonomy select dropdown options into one select dropdown.
If it is, there isn't such kind of built-in feature within Toolset plugins, and I don't think it is a good idea, if you use custom codes merged them, it might conducts other unexpected result, for example:
It will pass same URL parameter name to views, but Views don't know which taxonomy it is
Hi Luo,
Thank you for getting back to me. I didn't think this would be straight forward.
Thing is, as you can see in the attachment, these are our 'featured' locations. These only show a small selection of the properties we have....in total the are 67 on this site.
So am I to conclude, there is no way of add 'all' to the drop-down so it shows the option to select to view everything, or the small amount in the location taxonomies?
Many thanks, again. Pete
You can add "All" option into the taxonomy filter, see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-control-post-taxonomy
'default option text'
Add default option like All or Any on taxonomy select control.
And I see you have done it in your screenshot:
https://toolset.com/wp-content/uploads/2021/11/2215203-aa_1.png
To avoid more misunderstandings, please elaborate the question with more details:
there is no way of add 'all' to the drop-down so it shows the option to select to view everything, or the small amount in the location taxonomies?
If you want to limit the options of the taxonomy filter by user inputs, you can try to update search form with AJAX, for example:
Edit the post view you mentioned in screenshot:
https://toolset.com/wp-content/uploads/2021/11/2215203-aa_1.png
in section "Custom Search Settings", enable option "Let me choose individual settings manually"-> "Show only available options for each input"
Hi there Luo,
Thank you for your reply.
Ok I don't understand how I would do, or add to my View this....
You can add "All" option into the taxonomy filter, see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-control-post-taxonomy
'default option text'
Add default option like All or Any on taxonomy select control.
Then you say I have done this already.
We'll I have done nothing other than set the filter to the 'area' taxonomy, this in turn is showing all properties.
Hate to say, I also don't understand this....
in section "Custom Search Settings", enable option "Let me choose individual settings manually"-> "Show only available options for each input"
Please provide your website credentials in below private message box, also point out the problem page URL and view URL, I can setup a demo for you.