SHARE
TWEET

Untitled

a guest Apr 24th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 mobile-grid-50">
  24. <?php $team_member_image = get_field( 'team_member_image' ); ?>
  25. <?php if ( $team_member_image ) { ?>
  26.     <a href="<?php the_permalink(); ?>" data-remodal-target="modal-team" alt="<?php the_title_attribute(); ?>"><img src="<?php echo $image_url; ?>" alt="<?php echo $team_member_member_['alt']; ?>" /></a>
  27. <?php } ?>
  28. </div>
  29.  
  30. <div class="remodal" data-remodal-id="modal-team">
  31. <a data-remodal-action="close" class="remodal-close"></a>
  32. <main id="main" <?php generate_do_element_classes( 'main' ); ?>>
  33. <div id="team-single">
  34. <div class="grid-50 spacer-bottom-30-mobile">
  35. <?php $team_member_image = get_field( 'team_member_image' ); ?>
  36. <?php if ( $team_member_image ) { ?>
  37. <img src="<?php echo $image_url; ?>" alt="<?php echo $team_member_image['alt']; ?>" />
  38. <?php } ?>
  39. <a href="mailto:<?php the_field( 'team_email' ); ?>" target="_blank"><button class="width-100">Contact Me</button></a>
  40. </div>
  41. <div class="grid-50">
  42. <h1><?php the_field( 'team_name' ); ?></h1>
  43. <h2><?php the_field( 'team_title' ); ?></h2>
  44. <p><?php the_field( 'team_description' ); ?></p>
  45. </div>
  46. </div>
  47. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top