Home › Forums › Add-ons › Flexible Content Field › has_sub_field / get_row_layout don't work anymore › Reply To: has_sub_field / get_row_layout don't work anymore
I’ve changed a little bit your debug script:
`if( get_field(‘custom_tab_menu’) )
{
error_log(‘value exists: ‘. print_r(get_field(‘custom_tab_menu’),true) );
$i = 0;
while( has_sub_field( ‘custom_tab_menu’ ) )
{
$i++;
error_log( print_r( ‘Within loop: ‘ . $i . ‘, layout: ‘ . get_row_layout() , true ) ) ;
}
}`
And following the output: You’ll notice that has_sub_field( ‘custom_tab_menu’ ) never instantiates the first value, in this case [acf_fc_layout] => map…
[29-Nov-2013 13:43:40] value exists: Array
(
[0] => Array
(
[acf_fc_layout] => map
[map_contents] => Array
(
[0] => hotel
[1] => tourism
[2] => restaurant
[3] => bar
[4] => casino
)
[map_zoom_level] => 15
[own_location] => 1
)
[1] => Array
(
[acf_fc_layout] => related_specific_content
[destination] => same
[content] => 53
)
)
[29-Nov-2013 13:43:40] Within loop: 1, layout: related_specific_content
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.