Created
August 30, 2013 22:08
-
-
Save thoronas/6394780 to your computer and use it in GitHub Desktop.
ACF Image function
This file contains 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 = wp_get_attachment_image_src(get_field('image'), 'medium'); ?> | |
<img src="<?php echo $image[0]; ?>"> |
Unrelated to the issue at hand; this has some output escaping issues, should read:
<img src="<?php echo esc_url( $image[0] ); ?>" width="<?php echo esc_attr( $image[1] ); ?>" height="<?php echo esc_attr( $image[2] ); ?>"><p><?php //the_sub_field( 'what_description' ); ?></p>
the_sub_field( 'what_image' ) needs to be get_sub_field( 'what_image' )
Edit: Also what Joey said.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using this in my repeater field:
All I get is a number in return. :(