hubsta / acf-snippet-vsc

11 stars 9 forks source link

Missing $ for size variable in field:image:id #14

Open baezor opened 3 years ago

baezor commented 3 years ago

First of all, incredible job here!

I found a minor bug, when trying to use the field:image:id, we need to add the $ in the size variable:

if ( get_field('icon') ) {
  $attachment_id = get_field('icon');
  $size = "full"; // (thumbnail, medium, large, full or custom size)
  wp_get_attachment_image( $attachment_id, $size );  //Here!
}