Ready to get started?Download WordPress


Category based archives (yearly)? (2 posts)

  1. Agent D
    Posted 4 years ago #


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

  2. jessn
    Posted 4 years ago #

    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; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic