WordPress.org

Ready to get started?Download WordPress

Forums

"this month's categories" (1 post)

  1. Ixai
    Member
    Posted 7 years ago #

    I've seen tons of posts about having category archive by month and tried to sort a solution from there but I wasn't able to... what I want is somehow similar: listing all categories that have one or more posts this (or any) month.
    What I've done so far:

    `[...]<?php if (is_category() && is_month()){?>
    <h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category from <?php the_time('F, Y'); ?></h2><?php } ?>[...]`

    this allows you to enter an URL of the form /?m=200707&cat=1 and it does list all posts from July 2007 that have category 1 assigned.
    My problem:
    I need to modify the sidebar so it shows links to "this month's categories" and I have no idea how to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic