Support » How-To and Troubleshooting » Category based archives (yearly)?

Category based archives (yearly)?

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

    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    <?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.