Advanced Custom Fields
How to I check to see if an advanced custom field has a value inser (1 post)

  1. bhouse
    Posted 3 years ago #

    Is it possible to check and see if an advanced custom field has a value inserted into it?

    For example, in Safari, a dead image link is printed on the screen if no image link is inserted into the advanced custom field. I have the following code and it basically always outputs a dead image if a link is not actually inserted.

    <img src="<?php echo get_field('full_width_image_link'); ?>" />

    In effect, I would like to check and see if it has a value, and if it does not it won't out output that bit of code.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic