author.php
Description: Displays posts written by a specific author.
This template includes the following templates:
Template Code
<?php get_header() ?>
<div id="container">
<div id="content">
<?php the_post() ?>
<h2 class="page-title author"><?php printf(__('Author Archives: <span class="vcard">%s</span>', 'sandbox'), "<a class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</a>") ?></h2>
<div class="archive-meta"><?php if ( !(''== $authordata->user_description) ) : echo apply_filters('archive_meta', $authordata->user_description); endif; ?></div>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div>
<div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div>
</div>
<?php rewind_posts(); while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>">
<h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div>
<div class="entry-content ">
<?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?>
</div>
<div class="entry-meta">
<span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span>
<span class="meta-sep">|</span>
<?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?>
<?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?>
<span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span>
</div>
</div><!-- .post -->
<?php endwhile ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div>
<div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div>
</div>
</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.apply_filters()See support for this tag.comments_popup_link()is a WordPress tag which displays a link either to the comments pop-up window or to the normal comments page, depending on which has been selected in the current template.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_headeris a WordPress include tag which includes the fileheader.php.get_sidebaris a WordPress include tag which includes the filesidebar.php.get_footeris a WordPress include tag which includes the filefooter.php.get_the_category_list()is a WordPress function which creates a list of categories.get_the_time()is a WordPress tag which returns the time of the current post. It must be used within The Loop.get_the_title()is a WordPress tag which accepts a post ID and returns the title of the post.have_posts()is part of The Loop.next_posts_link()is a WordPress tag. Despite its name, it creates a link to the previous posts.previous_posts_link()is a WordPress tag. Despite its name, it creates a link to the next posts.printf()is a PHP string function used to output a formatted string.rewind_posts()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_date()is a WordPress tag which displays or returns the date of a post.the_excerpt()is a WordPress tag which displays an excerpt of the current post, followed by an ellipsis. See support for this tag.the_ID()is a WordPress tag which displays the numeric ID of the current post. It must be within The Loop.the_permalink()is a WordPress tag which displays the URL for the permalink to the post currently being processed in The Loop. This tag must be used within The Loop.the_post()is aWP_Querymethod: "Advance onto the next post, and set the global $post variable."the_tags()is a WordPress tag which displays a link to the tag or tags a post belongs to. This tag should be used within The Loop..the_time()is a WordPress tag which displays the time of the current post. This tag must be used within The Loop.the_title()is a WordPress tag which displays or returns the title of the current post. This tag must be used within The Loop.unset()is a PHP variable handling function which destroys the specified variables. (According to a note in the PHP Manual,unset()is not actually a function, but a language construct.)wp_specialchars()is a WordPress function that is "like the PHP function htmlspecialchars except it doesn't double-encode HTML entities." (Function Reference)
HTML Skeleton
[HEADER.PHP] <div id="container"> <div id="content"> <h2 class="page-title author">Author Archives: <span class="vcard"><a class='url fn n' rel='me'>[AUTHOR]</a></span> </h2> <div class="archive-meta"> <p>[USER BIO]</p> </div> <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"><a rel="bookmark">[POST TITLE]</a></h3> <div class="entry-date"> <abbr class="published" title="[DATE]">[MONTH DAY, YEAR] – [TIME]</abbr> </div> <div class="entry-content "> <p>[POST CONTENT]</p> </div> <div class="entry-meta"> <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 --> </div> <!-- #container --> [SIDEBAR.PHP] [FOOTER.PHP]
Related CSS Styles
Resources
- N/A