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
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.
Christian,
Thanks for your response. I ended up customizing that snippet in my previous post, which worked great!
Thanks again.
Saul