Created
December 6, 2012 11:11
-
-
Save feedmeastraycat/4223753 to your computer and use it in GitHub Desktop.
WordPress: Latest posts with date
This file contains hidden or 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
<?php | |
$lq = new WP_Query(array('posts_per_page' => 10)); | |
if ( $lq->have_posts() ): while ( $lq->have_posts() ): $lq->the_post(); ?> | |
<?php the_time('Y-m-d') ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br> | |
<?php endwhile; endif; | |
wp_reset_postdata(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment