I have made my home page as a static page. I want to show the "Latest Posts" on the bottom of that page which will make it more dynamic. I know this requires a loop but I'm not familiar with creating one.
I have made my home page as a static page. I want to show the "Latest Posts" on the bottom of that page which will make it more dynamic. I know this requires a loop but I'm not familiar with creating one.
This plugin is very flexible for something like that:
http://wordpress.org/extend/plugins/recent-posts-plugin/
Need to also install http://wordpress.org/extend/plugins/post-plugin-library/
If you don't like the plugin route, here's some code for your page template that you would put AFTER your existing loop:
<?php
$posts=get_posts('numberposts=5');
if ($posts) {
foreach($posts as $post) {
setup_postdata($post);
?>
<?php the_time('m.d.y') ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<?php }
}
?>Thanks MichaelH I'll try one of those
This topic has been closed to new replies.