Hi @elliot,
Really sorry about this. My bad, I updated the code and now its working fine.
I fixed it when I was trying to explain my problem here.
So yes everything works like charm. 🙂
Thanks a lot,
Kuldeep
Thanks Elliot! Works like charm! 🙂
EDIT
BTW. I managed to create flexible field inside flexible in dashboard. Now when I’m trying to return value of this fields in front end.But its not returning value of sub flexible fields.
I’m using following is code.
<?php
while (has_sub_field("main_field")):
?>;
<?php
if (get_row_layout() == "layout_1"):
?>
<div>
<php the_sub_field("textarea"); ?>
</div>
<?php
endif;
?>
<?php
if (get_row_layout() == "layout_2"):
?>
<?php
if (get_sub_field("main_2")):
?>
<?php
if (get_row_layout() == "layout_2a"):
?>
<div>
<?php
the_sub_field("text_field");
?>
</div>
<?php
elseif (get_row_layout() == "layout_2b"):
?>
<img src="<?php
the_sub_field('image_field');
?>" class="alignnone size-full" />
<?php
endif;
endif;
endif;
?>
<?php
endwhile;
?>