• 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!!

Viewing 1 replies (of 1 total)
  • 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; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Category based archives (yearly)?’ is closed to new replies.