Skip to content

Instantly share code, notes, and snippets.

@1shiharat
Created September 9, 2014 10:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save 1shiharat/343f212ccaa0c8a4e376 to your computer and use it in GitHub Desktop.
acf_image.php
<?php
$image_id = get_field( 'カスタムフィールドID' );
$src = wp_get_attachment_image_src( $image_id, 'カスタムサイズのスラッグ' );?>
<img src="<?php echo esc_url( $src['url'] ); ?>" alt="placeholder+image">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment