Hi , What's the recommended way to create a select dropdown list from taxonomy field that when selected will open the custom post associated with selected taxonomy.
I'm new to Blocks, so a detailed explanation - or tutorial would be appreciated.
Thanks for any help
So while you're on you weekend break (enjoy!) I've made some progress created a view with several search fields - for each taxonomy I want to search.
So now my questions are:
1. Where do I create the custom css class to add to a block element. (eg. the select dropdown boxes have 100% width. I want them to be around 30%)
2. How do I redirect to the custom post page for the selected taxonomy - at the moment the name is just selected - I want to open the page the taxonomy belongs to.
So the attached image is a 2 column grid inside a container block. How can I add custom css to the container to adjust the width and positioning of the dropdown boxes and text.
Also need answer to question 2 above.
Thanks
Hello. Thank you for contacting the Toolset support.
Lets attend the issue one by one and solve them.
Regarding:
2. How do I redirect to the custom post page for the selected taxonomy - at the moment the name is just selected - I want to open the page the taxonomy belongs to.
- There is no native option available to using which you can redirect to the selected term archive page when you select the term from the taxonomy dropdown. As you are using views, views will update the results on the same page.
However, I've workaround to offer you where we need to add custom JS code using which we can redirect to the selected term archive page.
If you can share problem URL and access details I would be happy to assist you further.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
This is just a snippet but you get the idea.
This is what I did on the on the home page - and want to redo it using Blocks - is there a way of inserting the above code into the <select> </select> on the page I'm requesting help with?
Hi Minesh, I have a plugin "chosen for wordpress" which makes select boxes more user friendly and aesthetic.
I activated it with an HTML block containing only shortcode:
[chosen]
And it seems to work well
The thing is that - to display the associated archive, you need to create taxonomy archive from here and design your output as per your need.
=> hidden link
I've created the taxonomy archive and attach to taxonomy "Botanical Names", you can assign the same archive to multiple taxonomies.
=> hidden link
- You can add whatever fields you want to display within the Loop Editor section.
Then, I've changed the permalink to the postname:
=> hidden link
Hi Minesh, Thanks for all your work and the detailed explanation. Unfortunately there was a misunderstanding, if you go to my site hidden link and select from any of the the lists of names it should take you to the plant custom post that that name applies to - try it!
I've restored the site from backup, if it would be possible to redirect to the relevant plant post (where the name appears) when one of the names is clicked, please let me know how.
Attached is a sample plant post that clicking a name on the home page should redirect to
Thanks
Ok - I've selected the option "aaronsohnia-factorovsky-warb-eig" from the first drop-down select and when I select it it took me on the following page:
=> hidden link
That's correct - on hidden link are all the names - English, Arabic, Hebrew and the botanical names that the lists on the home page refer to, there's also other info - life form, habitat etc. and also buttons that take you to the medicinal uses of the plant. That's the theory, this is still a work in progress, but the idea is clicking on names in any of the lists takes you to the plant of that name. At the moment I've inserted all the <option value="plant's url"> manually, was wondering if it's possible to create the option url to redirect to the plant in code with Toolset.
Thanks
Once you share that information, I will setup a small demo for you about how you can set the views and add filters to it so that you do not have to add the option values manually.
chosen for wordpress is a plugin for styling <select> boxes, I've deactivated the plugin, and removed the shortcode [chosen] from the html, but I see the error is still occuring - don't know how to remove the problem code