-
-
Save matgargano/8b6d8ed5784928b219ef18270d752281 to your computer and use it in GitHub Desktop.
Calling in custom image field that is setup to require user to crop image to set aspect ratio. Replaced Featured Image.
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
<?php | |
$image = get_field('top_image'); | |
$link = get_field('link', $image['ID']); | |
?> | |
<figure class="featured-image"> | |
<img src="<?php echo esc_url( $image['url'] ); ?>" alt="<?php esc_attr_e( $image['alt'] ); ?>" /> | |
</figure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment