Skip Navigation

[Resolved] Remove custom field and taxonomy search from specific archive

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by fahimS-2 1 year, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2581011

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.

#2581961

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/

#2584565

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?

#2586335

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.

#2589433

My issue is resolved now. Thank you!