Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying posts within the loop.
- *
- * @package GeneratePress
- */
- if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
- }
- ?>
- <?php
- // first, get the image object returned by ACF
- $image_object = get_field('team_member_image');
- // and the image size you want to return
- $image_size = 'large';
- // now, we'll exctract the image URL from $image_object
- $image_url = $image_object['sizes'][$image_size];
- ?>
- <div class="team-archive grid-33 tablet-grid-50">
- <?php $team_member_image = get_field( 'team_member_image' ); ?>
- <?php if ( $team_member_image ) { ?>
- <a href="<?php the_permalink(); ?>" alt="<?php the_title_attribute(); ?>"><img src="<?php echo $image_url; ?>" alt="<?php echo $team_member_member_['alt']; ?>" /></a>
- <?php } ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement