Created
April 2, 2011 17:47
-
-
Save chasereeves/899698 to your computer and use it in GitHub Desktop.
Latest Posts Loop
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
//=========================================================== Latest Posts Loop | |
function widget_latest_posts() { | |
$widget_latest_posts = new WP_Query('posts_per_page=3'); | |
while ($widget_latest_posts->have_posts()) : $widget_latest_posts->the_post(); ?> | |
<div> | |
<h4><a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_title()?></a></h4> | |
<?php the_excerpt() ?> | |
<p class="widget_latest_posts_meta">Posted on <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_date() ?></a></p> | |
</div> | |
<?php endwhile; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment