• Hello,

    I found several posts about this subject with no apparent solution.

    I want to have in the sidebar a monthly list of archives from ONLY the selected category (when a category is selected, or when a post that matches that category is being read). At other times there should be no monthly archive.

    Is this somehow easily doable? Thanks a bunch if you share your knowledge!

Viewing 2 replies - 16 through 17 (of 17 total)
  • OK, I have finally solved this, with the help of some people at the sitepoint forum.

    As it displays the CAT ID when you browse the archive, you can use this to check against the URL with PHP:

    https://localhost/content/2007/07/?cat=2

    So the PHP to check the URL query string is:

    <?php if($_SERVER['QUERY_STRING'] == 'cat=2'){ ?>
          Archives
    <?php } ?>

    Not the cleanest way to do it, but for some reason I could never get “is_archive” to work.

    Hello,

    I’m in the same boat as several other 2.2 users have noted. All seems to work, the correct months show-up in the sidebar for the respective category, but when a link/month from the sidebar archive list is selected, it displays posts from all categories–not only the category in question. The URl for the archive query seems correct. In this case category 4:

    …/wordpress/?m=200708?cat=4

    Any ideas?

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Category archive by month’ is closed to new replies.