function agency_team_members_home_list()
{
    $team_members = new WP_Query(array('post_type' => 'team', 'orderby' => 'rand', 'posts_per_page' => '4'));
    if ($team_members->have_posts()) {
        while ($team_members->have_posts()) {
            $team_members->the_post();
            ?>

      <div <?php 
            post_class("team-member _1-4");
            ?>
>
        <?php 
            $post_img = get_the_post_thumbnail(get_the_ID(), 'portfolio-grid');
            if ($post_img) {
                ?>
        <a href="<?php 
                the_permalink();
                ?>
"><?php 
                echo $post_img;
                ?>
</a>
        <?php 
            } else {
                ?>
        <a href="<?php 
                the_permalink();
                ?>
"><?php 
                agency_placeholder('team');
                ?>
</a>
        <?php 
            }
            ?>


        <h5><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h5>
        <?php 
            agency_team_member_title(get_the_id());
            ?>

      </div><!--/.team-member-->
  
    <?php 
        }
    }
}
Beispiel #2
0
        <?php 
    the_post_thumbnail($post->ID, 'responsive');
    ?>
      <?php 
} else {
    ?>
        <?php 
    agency_placeholder('team');
    ?>
      <?php 
}
?>
      <h1><?php 
the_title();
?>
</h1>
      <?php 
agency_team_member_title($post->ID);
?>
      <div>
        <?php 
the_content();
?>
      </div>
      <ul class="social">
        <?php 
agency_team_member_social($post->ID);
?>
      </ul>

    </section>
    ?>
      <a class="team-photo" href="<?php 
    the_permalink();
    ?>
"><?php 
    agency_placeholder('team');
    ?>
</a>
      <?php 
}
?>
      <h2><a href="<?php 
the_permalink();
?>
"><?php 
agency_team_member_name();
?>
</a></h2>
      <?php 
agency_team_member_title();
?>
      <?php 
the_excerpt();
?>

      <ul class="social">
        <?php 
agency_team_member_social();
?>
      </ul>
    </section>