Thanks for the video! Do you know how to return a long piece of code with if statements like this, echo ''; if(have_rows('modules')): while(have_rows('modules')): the_row(); $videoOptions = get_sub_field('video_options'); $title = get_sub_field('title'); $video = get_sub_field('video'); $oembed = get_sub_field('oembed'); echo ''; echo '' . $title . ''; if($videoOptions == "Video"){ echo ''; } elseif($videoOptions == "oEmbed"){ echo $oembed; } echo ''; endwhile; endif; echo ''; I did echo because that's what I know but it's not displaying properly. Only return works well, and I know that because I did return 'hello world', and it did what I wanted. The longer code above displays, but in the wrong place and I don't know why. I know it's a loaded question and that you're busy but any help will be greatly appreciated!
Thank you Mike for these good tutorials, You're the best teacher i never see on RUclips,
You help me a lot Mike may God bless you 🙏
Thanks so much for these videos Mike. I hope you are doing okay.
you're the best!
Thank You!
thanks
but what does a return 0 or return 1 do???
Thanks for the video! Do you know how to return a long piece of code with if statements like this,
echo '';
if(have_rows('modules')): while(have_rows('modules')): the_row();
$videoOptions = get_sub_field('video_options');
$title = get_sub_field('title');
$video = get_sub_field('video');
$oembed = get_sub_field('oembed');
echo '';
echo '' . $title . '';
if($videoOptions == "Video"){
echo '';
} elseif($videoOptions == "oEmbed"){
echo $oembed;
}
echo '';
endwhile; endif;
echo '';
I did echo because that's what I know but it's not displaying properly. Only return works well, and I know that because I did return 'hello world', and it did what I wanted. The longer code above displays, but in the wrong place and I don't know why.
I know it's a loaded question and that you're busy but any help will be greatly appreciated!