Skip Navigation

[Resolved] Displaying a custom field group for a specific page

This support ticket is created 5 years, 2 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 josephC-5 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1361997

Hi there,

Is it possible to display a custom field group on a specific page in the WP dashboard (not a custom post type, but just one or two pages)? For example, could I add a condition in the Data Dependent tab of the "Where to use this Field Group" dialog?

Or do I need to use a snippet of PHP such as the one mentioned in https://toolset.com/forums/topic/post-field-group-not-saving-correctly/page/2/#post-1199207?

Thank you!

Saul

#1362239

Hello, unfortunately there is no built-in way to conditionally assign a field or field group per post or per page, at least not directly. The data-dependent tab is for custom field-based conditions only, nothing like what you're describing. The template tab is more likely to be useful, though it's still not exactly what you asked about. In the template tab you can assign a field group to a specific Content Template. The field group will only appear now if that specific Content Template is assigned to the post you are editing. Depending on how many different field group / template combinations you're talking about, that could be practical or not...you would just have to copy your current Content Template a few times for those specific pages. It also means you would have to remember to modify all those multiple templates in the future, if a common element in the template design changes.

Other that the template solution, a custom code solution is the only other way I can think of to handle this type of conditional field group assignment.

#1362941

Christian,

Thanks for your response. I ended up customizing that snippet in my previous post, which worked great!

Thanks again.

Saul