WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Create One Link to All Archives ? (7 posts)

  1. cstina
    Member
    Posted 6 years ago #

    How would I create one link to all Archives?

    Example of what I'd like:

    http://blog.rbenson.info/archives

    Thanks

    .

  2. cstina
    Member
    Posted 6 years ago #

    Still need help with this. Anyone?

  3. Maxaud
    Member
    Posted 6 years ago #

    You could create an archives.php template for pages.
    And then make a page and choose it as a template.

    Most themes already have this template so you may not need it.

    It should look something like this:

    <?php
    /*
    Template Name: Archives
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="content" class="widecolumn">
    
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    
    <h2>Archives by Month:</h2>
      <ul>
        <?php wp_get_archives('type=monthly'); ?>
      </ul>
    
    <h2>Archives by Subject:</h2>
      <ul>
         <?php wp_list_cats(); ?>
      </ul>
    
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
  4. greeneyedggirl
    Member
    Posted 6 years ago #

    You could also goto Create a page under management on the Admin side and change the page template to Archive in the side menu. Creates exactly the same kind of thing Maxaud described.

    Samantha

  5. cstina
    Member
    Posted 6 years ago #

    Samantha,

    How do you change the template to Archive in the side menu?? Do you mean with a post slug?

  6. moshu
    Member
    Posted 6 years ago #

    If you have more than one Page templates in your theme folder - there will be an option on the right to select a Page template while writing/editing a Page.

  7. cstina
    Member
    Posted 6 years ago #

    Ahhhh thanks moshu! :)

    So I would just use the template above (posted by maxaud) and save as a template. Very nice.

Topic Closed

This topic has been closed to new replies.

About this Topic