Skip Navigation

[Resolved] Grouping fields based upon Taxonomy (wordpress category)

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to display some custom fields in a post editor screen conditionally, based on the taxonomy terms assigned to the post.

Solution: Use conditional field display settings to enable or disable field groups based on taxonomy terms.

100% of people find this useful.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by henrikG 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#922443

Hi Support

I have decided to move some custom post types from being custom post types to regular posts. They have the features of being posts but with extra information added in custom fields.

The reason why I want to move them from custom types to posts are that I would like to be able to use Elementor Post Queries to layout the visual part, and that I want the various post types to be included on the post archive.

So I was thinking if it is possible to only show the specific custom fields, based upon which wordpress category the post is in?

Sure I can put a "type" field on posts and use that as a condition for showing the right field meta group in the backend, but It would be cool if it was determined by the wordpress category instead.

I need inspiration 🙂 So any recommendations would be nice.

Kinde Regards

Henrik

#922699
Screen Shot 2018-07-09 at 4.33.11 PM.png

It's possible to set conditions for a field group's display based on the taxonomy term or terms selected. The conditional field group display will not change in the post editor screen, however, until the post has been saved. In other words it's not real-time, like a custom field condition. If that's okay, you can edit the Field Group in Toolset > Custom Fields, then edit the "Appears on" setting and select different criteria. You are probably familiar with choosing a specific post type here, but other tabs exist in the dialog. One of them is Taxonomies, as shown in the screenshot here. You can choose terms there, and if a post has those terms associated with it the conditional field group will be displayed in wp-admin.

#924635

Works perfect.

This is exactly what I had in mind.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.