display last post/posts in custom category in WordPress

Loading ...
<ul>
<?php $recentposts = get_posts('numberposts=3&category=5'); foreach ($recentposts as $post) : setup_postdata($post); ?>
<li>
<a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a>
<span><strong> <?php the_time('d.m.Y'); ?> </strong> in <strong> <?php the_category(' '); ?></strong></span>
</li>
<?php endforeach; ?>
</ul>
You may want to check :
- display recent posts
- Going Even Further With Custom Taxonomies AND Post Types
- Display the most popular posts, based on number of comments
- Display similar / Related Posts Without A Plug-In
- most commented / popular posts based on comments count