page.php
Description: Displays a page, as opposed to a post.
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() ?>
<?php wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?>
<?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 this page ?>
</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 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_link_pages()is a WordPress tag which displays page-links for paginated posts. It replaces the deprecatedlink_pages().
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">Disclaimer</h2> <div class="entry-content"> <p>[PAGE CONTENT]</p> <span class="edit-link">[EDIT LINK]</span> </div> </div> <!-- .post --> </div> <!-- #content --> </div> <!-- #container --> [SIDEBAR.PHP] [FOOTER.PHP]
Related CSS Styles
Resources
- N/A