Home › Forums › Backend Issues (wp-admin) › How to get all ACF groups or field for specific post type › Reply To: How to get all ACF groups or field for specific post type
Try
$groups = acf_get_field_groups(array('post_type' => 'your-post-type'));
That will get the groups, I think. You then need to loop through the groups and use the group key to get the fields in each group using
$fields = acf_get_fields($group_key);
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.