Agent D
Member
Posted 2 years ago #
Hi,
I'm trying to creat archive page for a specific category. I got it to work in yearly archive so far.
<?php wp_get_archives('type=yearly'); ?>
Now I need to find a way to only show the posts from category 9. If anyone can help me or give me a suggestion I really appreciate it. Thanks!!
Try this: (change the category name)
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('showposts=10&category_name=music'.'&paged='.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
...all the stuff here
<?php endwhile; ?>