links.php

Description: Displays a list of links.

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="links-page" class="xoxo">
<?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>') ?>
					</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.
  • comments_template() is a WordPress include tag which includes the file comments.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_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_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_sidebar is a WordPress include tag which includes the file sidebar.php.
  • sandbox_post_class() is a Sandbox-specific class 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."
  • 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 a WP_Query method: "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_list_bookmarks() is a WordPress tag which displays the blogroll.

HTML Skeleton

[HEADER.PHP]

<div id="container">
	<div id="content">

		<div id="post-[#]" class="hentry p1 page publish author-[AUTHOR] category-uncategorized tag- y[YEAR] m[MONTH] d[DAY] h[HOUR]">
			<h2 class="entry-title">Links</h2>
			<div class="entry-content">
				</p>
				<ul id="links-page" class="xoxo">
					<li id="linkcat-[#]" class="linkcat">
						<h3>Blogroll</h3>
						<ul>
							<li>[LINK]</li>
						</ul>
					</li>
				</ul>
				<span class="edit-link">[EDIT]</span>
			</div>
		</div>
		<!-- .post -->

	</div>
	<!-- #content -->
</div>
<!-- #container -->

[SIDEBAR.PHP]

[FOOTER.PHP]

Related CSS Styles

Resources

  • N/A