Skip to content

Instantly share code, notes, and snippets.

@nanoanno
Created March 29, 2021 20:56
Show Gist options
  • Save nanoanno/becdb6a00309c2546c20d3abd7b7751a to your computer and use it in GitHub Desktop.
Save nanoanno/becdb6a00309c2546c20d3abd7b7751a to your computer and use it in GitHub Desktop.
An example of using the get_acf_image_with_alt function
<a class="member" href="<?php the_permalink(); ?>">
<?php echo get_acf_image_with_alt( 'serious_photo', get_the_ID(), 'team-member', false, 'serious-photo' ); ?>
<?php echo get_acf_image_with_alt( 'funny_photo', get_the_ID(), 'team-member', false, 'funny-photo' ); ?>
<p class="name"><?php the_title(); ?></p>
<p class="title"><?php the_field( 'team_page_title' ); ?></p>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment