WP Question
WP Question
- Started
- Last post
- 3 Responses
- dbloc
i it possible to show the last 5 posts of a certain category on a page?
- dbloc0
this probably only works for the posts section, right?
- dbloc0
ahaaa. looking into this.
- MrShim0
You can create a page template for the page and assign it, then modify the post query to select only from the selected category.
<?php
//The Query
query_posts('category_name=whatever&posts_per_page=5');//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
..
endwhile; else:
..
endif;//Reset Query
wp_reset_query();?>
More here: http://codex.wordpress.org/Funct…