Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.