Archives page

  • My theme doesn’t have an archives page, but it does have the following code in the main index.php (sidebar section):

  • <?php _e(‘Archives’); ?>
      <?php wp_get_archives(‘type=monthly’); ?>

      When I’ve created my page, will WP automatically archive posts, or do I have to do something? I’ve been reading up on this, but I’m not sure how this works.


Viewing 1 replies (of 1 total)
  • I’m not sure to understand what you mean.

    When you create and publish a post in WP, it gets automatically archived, meaning it automatically appears in an archive page (i.e. when you browse your blog’s categories or on a date-based page).

    The wp_get_archives(‘type=monthly’) function returns a list of months where blog posts have been posted. Each of these months are clickable, and brings you to an archive page where all posts published in this month are shown.

Viewing 1 replies (of 1 total)
  • The topic ‘Archives page’ is closed to new replies.
Skip to toolbar