[Resolved] Show X numbers of posts in a X category
Hi, I’ve found this code:
<ul> <?php $ultimos_post = get_posts('numberposts=5&category=1'); foreach($ultimos_post as $post) :?> <li><a>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ul>
This code shows the 5 last posts in the category 1.
I’ve expend many hours trying to found this code, and finaly I Found it, I couldn’t found it in this forum or in the wordpress codex, so I publish the solution for this problem.
- The topic ‘[Resolved] Show X numbers of posts in a X category’ is closed to new replies.