Last active
August 29, 2015 14:01
-
-
Save yellowberri-snippets/6c1ab5bc7c94c9b3db13 to your computer and use it in GitHub Desktop.
PHP: ACF: Barebones Image Field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$image = get_field('image'); | |
$image['alt'] = ( empty($image['alt']) ? "\x20" : $image['alt'] ); | |
echo "<img src='" . $image['sizes']['medium'] . "' alt='" . $image['alt'] . "'>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment