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];
- $rand_number = rand(10,100);
- $post_id = get_the_ID();
- ?>
- <div class="team-archive grid-33 tablet-grid-50 mobile-grid-50">
- <?php $team_member_image = get_field( 'team_member_image' ); ?>
- <?php if ( $team_member_image ) { ?>
- <a href="<?php the_permalink(); ?>" data-remodal-target="modal-team-<?php echo $post_id;?>" alt="<?php the_title_attribute(); ?>"><img src="<?php echo $image_url; ?>" alt="<?php echo $team_member_member_['alt']; ?>" /></a>
- <?php } ?>
- </div>
- <div class="remodal" data-remodal-id="modal-team-<?php echo $post_id;?>">
- <a data-remodal-action="close" class="remodal-close"></a>
- <main id="main" <?php generate_do_element_classes( 'main' ); ?>>
- <div id="team-single">
- <div class="grid-50 spacer-bottom-30-mobile">
- <?php $team_member_image = get_field( 'team_member_image' ); ?>
- <?php if ( $team_member_image ) { ?>
- <img src="<?php echo $image_url; ?>" alt="<?php echo $team_member_image['alt']; ?>" />
- <?php } ?>
- <a href="mailto:<?php the_field( 'team_email' ); ?>" target="_blank"><button class="width-100">Contact Me</button></a>
- </div>
- <div class="grid-50">
- <h1><?php the_field( 'team_name' ); ?></h1>
- <h2><?php the_field( 'team_title' ); ?></h2>
- <p><?php the_field( 'team_description' ); ?></p>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement