Skip Navigation

[Resolved] Custom Field Group for Child Pages Only

This support ticket is created 4 years, 10 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by calgaryA 4 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1549225

Just wondering if it's possible to specify to use a Custom Field Group for pages that have a parent page selected (aka a child page).

Thanks!

#1549737

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

No, that's not a condition that can be specified in the Custom Field Group display settings.

You would need a workaround that involves one of the possible options in the display settings.

So you could, for example, add a checkbox custom field for the posts you want the field group to appear on, use that as a display condition for the field group, and maybe use the save_post hook to automatically set that checkbox according to whether the page as parent or not.

https://developer.wordpress.org/reference/hooks/save_post/

#1553709

My issue is resolved now. Thank you!