Last active
August 23, 2019 11:09
-
-
Save christiaansnoei/b5a83916874e30735c21ab3631891f26 to your computer and use it in GitHub Desktop.
Get an image url with a certain size.
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_sub_field('image'); | |
| if( !empty($image) ): | |
| $image_url = $image['sizes']['large']; | |
| endif; | |
| if($image_url): | |
| ?> | |
| <img src="<?php echo $image_url; ?>" alt="" class=""> | |
| <?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment