Created
June 17, 2013 15:32
-
-
Save CEscorcio/5797820 to your computer and use it in GitHub Desktop.
get latest posts
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
<ul> | |
<?php $the_query = new WP_Query( 'showposts=5' ); ?> | |
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> | |
<span class="latestpostmeta"><?php the_time('M jS, Y') ?> </span></li> | |
<li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> | |
<li><?php the_excerpt(__('(more…)')); ?></li> | |
<?php the_post_thumbnail(); ?> | |
<?php endwhile;?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment