Echo Image if Video not present
-
Hi, I have been struggling with this for a while now and I know this can be done but have not been able to find a thread.
I think I need to modify this code
$value = get_field( “VIDEO” );
if( $value ) {
echo $value;
} else {
echo ‘IF VIDEO IS NOT UPLOADED THEN DISPLAY THE IMAGE THAT IS UPLOADED’;
}
So, what I am trying to do is in the same DIV on the page either display a VIDEO if there is one. If not then display the IMAGE that will be uploaded instead.
Any help will be much appreciated.Thanks,
Shaun.
The topic ‘Echo Image if Video not present’ is closed to new replies.