Home › Forums › General Issues › How to get field reference › Reply To: How to get field reference
Gotcha, with that info about child posts I’ve done some digging and found EXACTLY what I was looking for.
If I get the post_id of the field group post, and search in the wp_posts table for the posts whose parent_id is that post_id, I get the list of all the posts (fields) for that field group with their field name (post_excerpt) and field key (post_name).
This will allow me to programmatically get a list of all the fields and their corresponding field key for a specific field group, and use this info to save in the wp_postmeta table all the fields of a post in one call, which is my ultimate goal to speed things up.
Thanks so much for your help!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.