Forums

List of links to posts by year, then month (nest) (5 posts)

  1. KerriM
    Member
    Posted 2 years ago #

    Be gentle with me, as I'm brand new to word press, and bascially a beginner with PHP.

    I'm trying to create a sort of archive link list in the sidebar of the blog, all of which must be narrowed by a specific category. It's basically structured like this:
    - - - - - - - - - - - - - - - - - -
    Category
    Archives by Category (actually child categories)
    » Child Category
    » Child Category
    » Child Category…
    Archives by Date
    » 2009
    - December
    - November
    - October…
    » 2008
    - December
    - November
    - October…
    - - - - - - - - - - - - - - - - - -

    I've got the category-based links working just fine, but I can't figure out how to get the date-based links to do everything I need them to using wp_get_archives.

    First, I need them to be narrowed down to a specific category. I've been able to do this using the kwebble plugin.

    Secondly, I need to make them into a nested list, first by year, then by month, which seems completely impossible to do usingwp_get_archives. (Not to mention the fact that w/ the kwebble plugin enable, I can only sort by month with that tag).

    Third, I need to be able to assign an active class to the selected date-sorted link. This doesn't seem to be built into wp_get_archives's functions as it is the wp_list_categories function.

    I've googled looking for alternatives but haven't gotten far. Having a hard time finding anything that's both relevant and understandable.

    …help…?

  2. thetooon
    Member
    Posted 2 years ago #

    I've would use some of broad number of calendar plugins.

    But, for is the practical use of such lists, btw?

  3. MichaelH
    Volunteer
    Posted 2 years ago #

  4. KerriM
    Member
    Posted 2 years ago #

    thetoon, ha! I'm actually not sure what the practical use, in this particular case, is. The practical impetus, however, is it's what my client wants! :-\

    MichaelH, thanks! I'd been through a few plugins and hadn't found what I needed. Collapsing Archives seems to be doing the trick (and I almost dismissed it, thinking it was just a collapsing menu script, which I can do without a plugin…). But it's doing (almost) exactly what I need, including the ability to narrow by categories. Thanks!

  5. banesto
    Member
    Posted 2 years ago #

    Thanks, MichaelH for the advice!

    The first one was the closest to my need, but maybe somebody know how can I show nested YEAR - MONTH arhive without any posts?

    in the beginning there's
    +2010
    +2009
    +2008

    and by clicking on certain year, user can get expanded list of months in selected year with post count.

Topic Closed

This topic has been closed to new replies.

About this Topic