WordPress.org

Ready to get started?Download WordPress

Forums

archive list for specific category (7 posts)

  1. kei3h
    Member
    Posted 8 years ago #

    Hi this is newbie question.

    I made a custom page for a particular category, called category-X.php. I include header-X.php, sidebar-X.php etc. for this particular category.

    On sidebar, the tag
    <?php wp_get_archives('type=monthly'); ?>
    lists monthly archives for all posts on my blog (Dec 05, Nov 05, etc). How do I display monthly archives for posts ONLY in category-X ?
    Is there something like
    <?php wp_get_archives('type=monthly&category=12'); ?>

    Thanks in advance

  2. moshu
    Member
    Posted 8 years ago #

    There isn't. See the parameters: Template_Tags/wp_get_archives

  3. kei3h
    Member
    Posted 8 years ago #

    Is there any way to achieve this? I have a category for movies which I have customised, but the archives for specific (movie) category for differnet months are not obtainable. So archive for my whole blog gets displayed. I was looking to have something like-

    http://www.xyz.com/category/movies/2005/12

    please help if you can conjure up some code. I'm not much php literate.

  4. SCARECROW
    Member
    Posted 8 years ago #

    I too, would love something like this.

    I am in the same board kei3h... I need to be able to create archives based on date and organized by category.

    In my case, I have a careers section (job posts) and I have a press release section which has archives by date listed on it.

    When you view the archives, which should just display the archives of press releases and not job postings in the careers section as well...

    How can we do this? I can't believe there isn't something as simple as "&category=" - there should be.

  5. HapaxLegomen
    Member
    Posted 8 years ago #

    I need the same thing... and I can't find anywhere any solution... This parameter seems so needed and obvious for wp-archives...

  6. FruitFly
    Member
    Posted 8 years ago #

    I wouldn't say it's so needed and obvious. I'd guess 99% of WP users probably have no need for such a thing. The idea is keep the core code simple and use plugins & custom code to acheive the fringe stuff.

    This could likely be acheieved with some custom coding, or using archive pages. If PHP coding isn't your thing, there are likely some people who would work it out for you, for a cost of course.

  7. HapaxLegomen
    Member
    Posted 8 years ago #

    What a usefull answer !

Topic Closed

This topic has been closed to new replies.

About this Topic