WordPress/wp-content/themes/twentytwelve/content.php
lancewillett ed2548bb22 Twenty Twelve template changes and fixes ... see #19978.
* Add custom header support
 * header.php: use `get_stylesheet_uri()` to load stylesheet, props Mamaduka
 * Add full-width template, including adding relevant body_class value as a CSS hook
 * Hide sidebar on all views if no active widgets exist
 * Fix site title output (was missing site title)
 * Remove "featured" title for sticky posts
 * Add content template files for aside, image, link, and quote post formats
 * Indent content-single.php to match content.php
 * Remove sample JPG since Twenty Twelve ships with no default header images

... and style updates, props drewstrojny

 * Better footer styles
 * Styling for full-width layouts
 * Add basic styles for archive views
 * Refine post header/footer styles a bit


git-svn-id: http://svn.automattic.com/wordpress/trunk@19915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-14 03:54:46 +00:00

61 lines
2.7 KiB
PHP

<?php
/**
* The default template for displaying content on indexed pages (home, archive, search)
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php if ( 'post' == get_post_type() ) : // Hide entry meta for pages ?>
<div class="entry-meta">
<?php twentytwelve_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display excerpts for search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
if ( $categories_list ) :
?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
if ( $tags_list ) : ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( comments_open() ) : ?>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '<b>1</b> Reply', 'twentytwelve' ), __( '<b>%</b> Replies', 'twentytwelve' ) ); ?></span>
<?php endif; // End if comments_open() ?>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- #entry-meta -->
</article><!-- #post -->