archives.php
Description: An optional Archives Index page which displays a list of links to archive pages.
This template includes the following templates:
Template Code
<?php get_header() ?>
<div id="container">
<div id="content">
<?php the_post() ?>
<div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
<h2 class="entry-title"><?php the_title() ?></h2>
<div class="entry-content">
<?php the_content(); ?>
<ul id="archives-page" class="xoxo">
<li id="category-archives" class="content-column">
<h3><?php _e('Archives by Category', 'sandbox') ?></h3>
<ul>
<?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS') ?>
</ul>
</li>
<li id="monthly-archives" class="content-column">
<h3><?php _e('Archives by Month', 'sandbox') ?></h3>
<ul>
<?php wp_get_archives('type=monthly&show_post_count=1') ?>
</ul>
</li>
</ul>
<?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?>
</div>
</div><!-- .post -->
<?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar() ?>
<?php get_footer() ?>
This template includes the following tags:
__()is a WordPress function used to mark a string for translation to another language. It is similar to_e(), except that__()returns the string while_e()echoes it._e()is a WordPress function used to mark a string for translation to another language. It is similar to__(), except that__()returns the string while_e()echoes it.bloginfo()is a WordPress function that displays information about your blog. Using various parameters, the function can display the following strings:- Blog title;
- Blog tagline;
- Administrator's email address;
- Document content-type;
- Document charset;
- WordPress version;
- Blog URL;
- Pingback URL;
- URL of the RSS 0.92, RSS 1.0, RSS 2.0, or Atom feed;
- URL of the comments feed;
- URL of the directory in which WordPress is installed;
- URL of the current template's directory;
- URL of the current
style.cssfile; - URL of the stylesheet directory (deprecated)
comments_template()is a WordPress include tag which includes the filecomments.php.edit_post_link()is a Wordpress tag which displays a link to edit the current post (assuming the user is logged in and has the appropriate permissions).get_footeris a WordPress include tag which includes the filefooter.php.get_headeris a WordPress include tag which includes the fileheader.php.get_post_custom_values()is a WordPress PostMeta internal function used to get the list of values for a particular key on the current post. It should be within The Loop.get_sidebaris a WordPress include tag which includes the filesidebar.php.sandbox_post_class()is a Sandbox-specific class defined in thefunctions.phpfile. According to the Sandbox Readme, "It adds semantic classes to each postdivelement, relative to the actual post it contains."the_content()is a Wordpress tag which displays the contents of the current post. This tag must be used within The Loop.the_ID()is a WordPress tag which displays the numeric ID of the current post. It must be within The Loop.the_post()is aWP_Querymethod: "Advance onto the next post, and set the global $post variable."the_title()is a WordPress tag which displays or returns the title of the current post. This tag must be used within The Loop.wp_get_archives()is a WordPress tag which displays a date-based archives list. It replaces the similar but deprecatedget_archives(). This tag can be used anywhere within a template.wp_list_cats()displays a list of Categories as links. Bothwp_list_cats()andlist_cats()have been deprecated; they should be replaced withwp_list_categories().
HTML Skeleton
[HEADER.PHP] <div id="container"> <div id="content"> <h2 class="page-title">Monthly Archives: <span>[MONTH YEAR]</span></h2> <div id="nav-above" class="navigation"> <div class="nav-previous"> <span class="meta-nav">«</span> Older posts </div> <div class="nav-next"> <span class="meta-nav">»</span> Newer posts </div> </div> <div id="post-[#]" class="hentry p1 post publish author-[AUTHOR] category-[CATEGORY] tag-[TAG] y[YEAR] m[MONTH] d[DAY] h[HOUR]"> <h3 class="entry-title">[POST TITLE]</h3> <div class="entry-date"> <abbr class="published" title="[DATE]">[MONTH DAY, YEAR] – [TIME]</abbr> </div> <div class="entry-content"> <p>[CONTENT]</p> </div> <div class="entry-meta"> <span class="author vcard">By <a class="url fn n">[AUTHOR]</a></span> <span class="meta-sep">|</span> <span class="cat-links">Posted in <a rel="category tag">[CATEGORY]</a></span> <span class="meta-sep">|</span> <span class="tag-links">Tagged <a rel="tag">[TAG]</a></span> <span class="meta-sep">|</span> <span class="edit-link">[EDIT LINK]</span> <span class="meta-sep">|</span> <span class="comments-link">[COMMENTS LINK]</span> </div> </div> <!-- .post --> <div id="nav-below" class="navigation"> <div class="nav-previous"> <span class="meta-nav">«</span> Older posts </div> <div class="nav-next"> <span class="meta-nav">»</span> Newer posts </div> </div> </div> <!-- #content .hfeed --> </div> <!-- #container --> [SIDEBAR.PHP] [FOOTER.PHP]
Related CSS Styles
Resources
- N/A