PageRenderTime 292ms CodeModel.GetById 131ms app.highlight 4ms RepoModel.GetById 116ms app.codeStats 0ms

/wp-content/themes/twentyten/loop-single.php

https://bitbucket.org/abnopanda/wordpress
PHP | 67 lines | 43 code | 10 blank | 14 comment | 3 complexity | b90d42a570b34c866b62cc57ff0b4359 MD5 | raw file
 1<?php
 2/**
 3 * The loop that displays a single post.
 4 *
 5 * The loop displays the posts and the post content. See
 6 * http://codex.wordpress.org/The_Loop to understand it and
 7 * http://codex.wordpress.org/Template_Tags to understand
 8 * the tags used in it.
 9 *
10 * This can be overridden in child themes with loop-single.php.
11 *
12 * @package WordPress
13 * @subpackage Twenty_Ten
14 * @since Twenty Ten 1.2
15 */
16?>
17
18<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
19
20				<div id="nav-above" class="navigation">
21					<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
22					<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
23				</div><!-- #nav-above -->
24
25				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
26					<h1 class="entry-title"><?php the_title(); ?></h1>
27
28					<div class="entry-meta">
29						<?php twentyten_posted_on(); ?>
30					</div><!-- .entry-meta -->
31
32					<div class="entry-content">
33						<?php the_content(); ?>
34						<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
35					</div><!-- .entry-content -->
36
37<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?>
38					<div id="entry-author-info">
39						<div id="author-avatar">
40							<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
41						</div><!-- #author-avatar -->
42						<div id="author-description">
43							<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
44							<?php the_author_meta( 'description' ); ?>
45							<div id="author-link">
46								<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">
47									<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
48								</a>
49							</div><!-- #author-link	-->
50						</div><!-- #author-description -->
51					</div><!-- #entry-author-info -->
52<?php endif; ?>
53
54					<div class="entry-utility">
55						<?php twentyten_posted_in(); ?>
56						<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
57					</div><!-- .entry-utility -->
58				</div><!-- #post-## -->
59
60				<div id="nav-below" class="navigation">
61					<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
62					<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
63				</div><!-- #nav-below -->
64
65				<?php comments_template( '', true ); ?>
66
67<?php endwhile; // end of the loop. ?>