Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying posts within the loop.
  4. *
  5. * @package GeneratePress
  6. */
  7.  
  8. if ( ! defined( 'ABSPATH' ) ) {
  9. exit; // Exit if accessed directly.
  10. }
  11. ?>
  12.  
  13.  
  14. <?php
  15. // first, get the image object returned by ACF
  16. $image_object = get_field('team_member_image');
  17. // and the image size you want to return
  18. $image_size = 'large';
  19. // now, we'll exctract the image URL from $image_object
  20. $image_url = $image_object['sizes'][$image_size];
  21. ?>
  22.  
  23. <div class="team-archive grid-33 tablet-grid-50">
  24. <?php $team_member_image = get_field( 'team_member_image' ); ?>
  25. <?php if ( $team_member_image ) { ?>
  26. <a href="<?php the_permalink(); ?>" alt="<?php the_title_attribute(); ?>"><img src="<?php echo $image_url; ?>" alt="<?php echo $team_member_member_['alt']; ?>" /></a>
  27. <?php } ?>
  28. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement