• notthatugly

    (@notthatugly)


    The only parameter listed for get_archives() in the readme is ‘archivetype’, but a couple of the posts here suggest there’s more; does anyone have a list of the parameters for this tag?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mike Little

    (@mikelittle)

    function get_archives($type=”, $limit=”, $format=’html’, $before = “”, $after = “”, $show_post_count = false)
    type = one of ‘monthly’, ‘daily’, ‘weekly’, or ‘postbypost’, empty = use option configured type
    limit = limit number of entries/months/weeks/etc. returned
    format = one of ‘link’, ‘option’, ‘html’ or empty
    link will output link rel=”archives” entries
    option will output option value= entries for use in a form
    html will output list item links
    empty will use the before and after params
    before is for text/html to be output before the link
    after is for text/html to be output after the link (and also after the link but before the closing list item tag in html mode)
    show_post_count = whether to show a count of posts for that month (only works in monthly mode)
    Hope this helps,
    Mike

    Thread Starter notthatugly

    (@notthatugly)

    That’s great — thanks!

    Xial

    (@xial)

    Clearly, I’m out of my league.
    I would use get_archives(weekly,,option) if I wanted to override the default, and have a dropdown list for my archives, on a weekly basis? or would I have to manipulate the function directly (which is not optimal, as I use CVS builds)?

    Mike Little

    (@mikelittle)

    Try something like this (taken from this thread):
    <form name=”archiveform” action=””>
    <select name=”archive” onchange=”window.open(document.forms.archiveform.archive[document.forms.archiveform.archive.selectedIndex].value);”>
    <?php get_archives(‘weekly’,”,’option’); ?>
    </select>
    </form>
    I’m not 100% on the javascript but I think it should work.
    Mike

    jaykul

    (@jaykul)

    Feature Request: An optional categor(y|ies) parameter, which would let us use this on individual post pages to list other posts in the same category … that would be really nice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘parameters for <?php get_archives() ?>?’ is closed to new replies.