There are plugins that provide tags you can add to posts or pages to display recent posts, such as: http://wordpress.org/extend/plugins/yd-recent-posts-widget/
or you can use a get_posts structure to do that in your theme’s template file(s). See: http://www.daobydesign.com/blog/2007/07/modifying-wordpress-front-page/
Hi,
Use this code in order to display recent posts:
<?php query_posts(‘showposts=5’); ?>
Thanks,
Shane G.
Wouldn’t using query_posts like that suggested by Shane G. I believe will reguire a wp_reset_query();
so to restore the ‘main loop’ query values?
Hi,
My Code was wrapped in the format. Hence, I have posted it again here:
<?php query_posts('showposts=5'); ?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile;?>
</ul>
Thanks,
Shane G.
Shane G. Hey man thanks a lot for the php code. It worked perfectly on a custom made theme by me :D. Now i’m looking for archives and recent comments (not widget of course). Can you help me out?
Best regards
Coman Mihai
thanks Shange G
just what i needed!