Forums

Monthly archives dropdown for a category? (3 posts)

  1. HansD
    Member
    Posted 3 years ago #

    Making a dropdown list with links to monthly archives is not such a problem, for instance with the example on http://codex.wordpress.org/Template_Tags/get_archives or the hack on http://www.qwghlm.co.uk/blog/?p=740.

    What I would like to create is a similar dropdown list, but one which displays links to the monthly archives with post in only a distinct (current) category.

    I don't think that this can be achieved by a simple parameter. Does anyone know a method to achieve this?

  2. schestowitz
    Member
    Posted 3 years ago #

    What you describe at the start is similar to:

    http://wordpress.org/support/topic.php?id=5661

    (among other discussion including a recent thread)

    If what you want to do is a composition of months and categories (i.e. show me all posts from category X in month Y), you might need to do some coding. There is no magic URL that will do it as far as I know. If you have just one such category, all you need to do is add a simply condition that narrows down the matches to ones that belong to a particular category number.

    Start with the function that displays all posts for a given month, add the category-type condition and make that a new function. Then, take the examples above and have them link to your new function.

  3. steadyvibe
    Member
    Posted 3 years ago #

    How might that be done?

Topic Closed

This topic has been closed to new replies.

About this Topic