Skip to content

Instantly share code, notes, and snippets.

@sproutventure
Created November 14, 2010 23:15
Show Gist options
  • Save sproutventure/676207 to your computer and use it in GitHub Desktop.
Save sproutventure/676207 to your computer and use it in GitHub Desktop.
<?php
$count = 1;
$wp_query= null;
$args=array(
'taxonomy' => 'course-category', // taxonomy slug
'post_status' => 'publish',
'posts_per_page' => 2
);
$wp_query = new WP_Query($args);
while ($wp_query->have_posts()) : $wp_query->the_post();
$item = $count++;
?>
<div id="featured_<?php echo $item ?>" class="grid_3 <?php if ( $item == 2 ) echo 'omega '; ?>clearfix">
<div class="content">
<div class="feature_event">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if (function_exists('the_post_thumbnail')) { the_post_thumbnail( array(200,100) ); } ?></a>
<h5><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h5>
<p>
<?php
the_content();
?>
</p>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_query();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment