Created
June 4, 2014 03:54
-
-
Save lizkaraffa/81d0949884c16c9d7b14 to your computer and use it in GitHub Desktop.
the template file for the staff grid to be pulled in by the parent sectional page template.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Staff Page | |
* | |
* This is the template that creates a single section | |
* to be displayed in a Parent Sectional Page. | |
* | |
* @package garden | |
*/ | |
get_header(); ?> | |
<div class="section-item"> | |
<main id="main" class="site-main" role="main"> | |
<?php | |
$args = array( | |
'post_type' => 'staff', | |
'orderby' => 'DESC' | |
); | |
$the_query = new WP_Query( $args ); | |
?> | |
<?php if ( have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
<div class="staff-img"><?php the_field( 'image' ); ?></div> | |
<p class="staff-name"><?php the_field( 'title' ); ?></p> <!--Unknown field name since CF title --> | |
<p><?php the_field( 'position_title' ); ?></p> | |
<a href="<?php the_field( 'twitter' ); ?>"><div class="dashicons dashicons-twitter"></div></a> | |
<a href="<?php the_field( 'instagram' ); ?>"><img src="<?php echo get_stylesheet_directory_uri() . '/img/instagram.png'; ?>" alt="Instagram Icon" /></a> | |
<a href="<?php the_field( 'facebook' ); ?>"><div class="dashicons dashicons-facebook-alt"></div></a> | |
<a href="mailto:<?php the_field( 'email' ); ?>"><div class="dashicons dashicons-email"></div></a> | |
<?php endwhile; endif;// end of the loop. ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment