This is the template used for the Archive page under the About -> My Website menu item.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | <?php /* Template Name: Archives */ get_header(); ?> <div id=“primary”> <div id=“content” role=“main”> <div class=“post-headline”><h1>Archive</h1></div> <h2>Last 25 Posts</h2> <ul> <?php $archive = get_posts( ‘numberposts=25’ ); foreach ( $archive as $post ) : ?> <li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endforeach; ?> </ul> <h2>Archives by Month</h2> <ul> <?php wp_get_archives( ‘type=monthly&show_post_count=true’ ); ?> </ul> <h2>Archives by Subject</h2> <ul> <?php wp_list_categories( ‘title_li=’ ); ?> </ul> </div><!– #content –> </div><!– #primary –> <?php get_sidebar(); get_footer(); ?> |
This is a very simple application of the template, making use of standard WordPress functions.
The short URL of the present article is: http://www.terryobrien.me/RGhC8
Personal Links
My Amazon Wishlist
My DeviantArt Gallery
My Facebook Page
My Goodreads Bookshelf
My Smashwords Catalog
My Twitter Feed
My WordPress Profile