Home › Forums › ACF PRO › Is it possible to have 2 flexible field groups, but they work like one › Reply To: Is it possible to have 2 flexible field groups, but they work like one
Tried to get this working again and i seem to get it. It’s an array inside and array so i used this code to pull out the data (i used the ZIP file i have above).
<?php if( have_rows('modules_all') ):
while( have_rows('modules_all') ): the_row();
$checkbox = get_sub_field('is_custom_modules');
if($checkbox) { // is yes use custom modules ?>
<?php
//print_r(get_sub_field('modules_custom_reusable'));
$contentArray = get_sub_field('modules_custom_reusable');
$contentTitle = $contentArray['modules_custom'][0];
$contentTitle = print_r($contentTitle['content_title']);
?>
<?php $contentTitle; ?>
You can uncomment the first line to see how the array looks like or use var_dump instead print_r.
It may not be the perfect solution as i’m not a real PHPer but it seems to be working/taking me further.
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.