Support » Fixing WordPress » Create ARCHIVE link?

  • I currently have an “Archive” link on my site, in the header nav bar. I am wondering what the heck I am supposed to do with it, as I cannot seem to get it to link to the category page correctly.

    Do I insert the PHP snippet:
    <?php wp_get_archives(‘type=monthly&show_post_count=true’); ?>
    or is that way off base?

    Thanks for everybody’s response. I’ll get this yet.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The link was a choice by the theme designer, and what you put there in its place is up to you. However, that ‘snippet’ would list all archives links, and not just a link to archives. I suspect it would not be what you want.

    One option you have is to create an “archive” Page (Create > Pages) and assign a template to that Page which provides a list of your archives links. An example of that is provided here:

    http://codex.wordpress.org/Pages#Examples_of_Pages_and_Templates

    Ok, I have this page somewhat hacked to give me an archive page, but the formatting is wrong now, and I don’t know enough about PHP or xhtml to figure it out on my own. Can anyone take a look and tip me off as to the problem? Thanks.

    Here is the page:
    http://redlens.com/brooks/journal/archives/

    Try to compare your template with the single.php of your theme, and where The Loop appears in the template, that’s where you want to place your get_archives tag (i.e. replacing The Loop code).

    Thanks, that worked splendidly, after I did a little tweaking to make it work with my theme. You guys are geniuses.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create ARCHIVE link?’ is closed to new replies.