
Hello, I am using radio buttons to check if a condition is true and in the event that it is a class is added but the code using the radio button is not returning any video.
My ultimate goal is to use custom CSS to adjust the height for portrait video hence we check with radio button is the video is portrait. The options are yes and no, the default is no. If it is a portrait video the user selects yes and we use that information to add the class that will enable us to
This block of code works well
<?php
{$video_url = osetin_get_field(‘video_url’);
}
Now I have this block of code according to this guide https://www.advancedcustomfields.com/resources/radio-button/
<?php
//now check the condition, if radio button is yes, then it’s portrait video
if( get_field(‘portrait_video_radio’) == ‘yes’ )
{ //add a html wrapper (close php) and add custom class for portrait video
//then inside this html wrapper, show the portrait video
?>
<div class=”portrait-video”> $video_url = osetin_get_field(‘video_url’); </div><?php
}
//else display the landscape video
else {$video_url = osetin_get_field(‘video_url’);
}
Thanks for your help