I’m trying to replace an image with a gravatar if the image in the custom field returns false(or does not exisit)
So I’ve set my variable
<?php $thumb_image = get_field('thumb_image'); ?>
What is the value if there is no image in the custom field thumb_image? This is not working
<?php if ($thumb_image == false) : ?> <?php echo get_avatar( get_the_author_meta('ID') ); ?> <?php endif; ?>
- The topic ‘If get_field Equals False’ is closed to new replies.