Created
February 4, 2011 02:37
-
-
Save alisonmf/810652 to your computer and use it in GitHub Desktop.
work template for the main work page
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 | |
// Page Template Name: Work | |
?> | |
<?php get_header(); ?> | |
<div id="content"> | |
<h1 class="noLine">Work</h1> | |
<?php $args=array( | |
'post_type' => 'work', | |
); | |
$my_query = null; | |
$my_query = new WP_Query($args); | |
if ( $my_query->have_posts() ) { | |
while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
<?php | |
$postimageurl = get_post_meta($post->ID, 'thumbnail', true); | |
$postclientname = get_post_meta($post->ID, 'client_name', true); | |
?> | |
<a href="<?php the_permalink(); ?>"> | |
<img class="border" src="<?php bloginfo('url'); ?>/wp-content/work/thumbnails/<?php echo $postimageurl; ?>" alt="<?php the_title(); ?>" /> | |
</a> | |
<div class="thumbnailInfo"> | |
<h3>The Title</h3> | |
<h4><?php echo $postclientname; ?></h4> | |
</div> | |
<?php | |
endwhile; | |
} | |
wp_reset_query(); // Restore global post data stomped by the_post(). | |
?> | |
</div><!-- /content --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment