Skip to content

Instantly share code, notes, and snippets.

@Jagst3r15
Created April 30, 2012 20:11
Show Gist options
  • Save Jagst3r15/2562318 to your computer and use it in GitHub Desktop.
Save Jagst3r15/2562318 to your computer and use it in GitHub Desktop.
recent posts
<div id="front-block-2" class="front-block block">
<?php if($recentPosts->have_posts()) : while($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <h1><?php the_title(); ?></h1>
<?php $recentPosts-> the_permalink(); ?>
<?php endwhile; endif; ?>
<ul id="recent-items">
<?php
$recentPosts = new WP_Query(array('posts_per_page' => 1));
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
<li><?php the_post_thumbnail(thumbnail); ?><?php the_excerpt(); ?></li>
<?php endwhile; ?>
</ul>
</div><!-- #front-block-2 .front-block .block-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment