tag.php

Description: ...

This template includes the following templates:

Template Code

<?php get_header() ?>
	
	<div id="container">
		<div id="content">

	<h2 class="page-title"><?php _e('Tag Archives:', 'sandbox') ?> <span><?php single_tag_title(); ?></span></h2>

			<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 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="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span>
					<span class="meta-sep">|</span>
					<span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span>
					<span class="meta-sep">|</span>
<?php if ( $tag_ur_it = sandbox_tag_ur_it(', ') ) : ?>
					<span class="tag-links"><?php printf(__('Also tagged %s', 'sandbox'), $tag_ur_it) ?></span>
					<span class="meta-sep">|</span>
<?php endif ?>
<?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.
  • _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.css file;
    • URL of the stylesheet directory (deprecated)
  • 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_author_link() has been deprecated. Use get_author_posts_url() instead.
  • get_footer is a WordPress include tag which includes the file footer.php.
  • get_header is a WordPress include tag which includes the file header.php.
  • get_sidebar is a WordPress include tag which includes the file sidebar.php.
  • get_the_author() is a WordPress tag which returns the name of the author of the post.
  • 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. Counterintuitively, 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.
  • sandbox_post_class() is a Sandbox-specific function defined in the functions.php file. According to the Sandbox Readme, "It adds semantic classes to each post div element, relative to the actual post it contains."
  • sandbox_tag_ur_it() is a Sandbox-specific function, but I don't know what it does.
  • single_tag_title() is a WordPress tag which displays or returns the tag title for the current page.
  • sprintf() is a PHP string function which returns a formatted string.
  • 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 a WP_Query method: "Advance onto the next post, and set the global $post variable."
  • 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">Tag Archives: <span>[TAG]</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>[POST 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">Also tagged <a rel="tag">[TAG]</a></span>
				<span class="meta-sep">|</span>
				<span class="edit-link">[EDIT]</span>
				<span class="meta-sep">|</span>
				<span class="comments-link">[COMMENTS]</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