Created
April 15, 2012 11:23
-
-
Save rosshanney/2391990 to your computer and use it in GitHub Desktop.
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: Projects | |
*/ | |
get_header(); ?> | |
<div id="primary"> | |
<div id="content" role="main"> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<header class="entry-header"> | |
<h1 class="entry-title"><?php the_title(); ?></h1> | |
</header> | |
<div class="entry-content"> | |
<?php the_content(); ?> | |
<?php | |
$args = array( | |
'post_parent' => $post->ID, | |
'post_type' => 'page', | |
'post_status' => 'publish', | |
'numberposts' => -1 | |
); | |
$postslist = get_posts($args); | |
?> | |
<?php foreach ( $postslist as $post ) : ?> | |
<?php setup_postdata( $post ); ?> | |
<div class="project"> | |
<a href="<?php the_permalink(); ?>"><?php if( has_post_thumbnail() ) the_post_thumbnail('Project'); ?></a> | |
<div class="project-meta"> | |
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> | |
<p class="time"><?php the_time('F, Y') ?></p> | |
</div><!-- project-meta --> | |
<div class="project-summary"> | |
<?php the_excerpt(); ?> | |
</div><!-- project-summary --> | |
</div><!-- project --> | |
<?php endforeach; ?> | |
</div><!-- entry-content --> | |
<?php endwhile; endif; ?> | |
</div><!-- #content --> | |
</div><!-- #primary --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment