I have created a WordPress archive which I have assigned to home archive and custom-taxonomy1 archive. In the archive, I have added search options for custom-field1, custom-field2, custom-taxonomy1 and custom-taxonomy2. Now, when a user visits custom-taxonomy-1 archive, I don't want the custom-taxonomy1 and custom-field1 search options to be added to the archive. Is there any solution that I can use?
Thanks.
Hello,
I suggest you follow our document to setup a different Toolset WordPress Archive(without the custom-taxonomy1 and custom-field1 search options).
And assign it to taxonomy "custom-taxonomy-1":
https://toolset.com/course-lesson/creating-a-custom-archive-page/
Hi, thanks for the reply. Actually an unified archive help me to edit and manage them. Is there any way to remove it through custom code?
You can try with Toolset conditional shortcode, see below sand box website:
Login URL: hidden link
1) Dashboard-> Toolset-> Settings->
hidden link
in section "Functions inside conditional evaluations", add the WordPress built-in function name: is_tax
2) Edit your unified WordPress Archive:
hidden link
add a Toolset conditional block, setup the condition as below:
NOT (
The result of is_tax('custom-taxonomy-1', null) is equal to 1.
)
within above Toolset conditional block display those custom-taxonomy1 and custom-field1 search options
3) see the results here:
hidden link
hidden link
It works fine.
My issue is resolved now. Thank you!