Home › Forums › Front-end Issues › Show an entire specific field group in frontend › Reply To: Show an entire specific field group in frontend
Hi, in now im late but maybe this helps someone else…
With ACF Pro you can try something like:
$fields = array();
$groups = acf_get_field_groups(array('post_type' => 'kontakte'));
foreach($groups as $group){
$fields[$group['title']] = $group;
$f = acf_get_fields($group['ID']);
foreach($f as $i){
$fields[$group['title']]['fields'][$i['name']] = $i;
$fields[$group['title']]['fields'][$i['name']]['value'] = get_field($i['key']);
}
}
Greets
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.