Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-content/themes/twentyten/single.php

    r17340 r16630  
    1313            <div id="content" role="main">
    1414
    15             <?php
    16             /* Run the loop to output the post.
    17              * If you want to overload this in a child theme then include a file
    18              * called loop-single.php and that will be used instead.
    19              */
    20             get_template_part( 'loop', 'single' );
    21             ?>
     15<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
     16
     17                <div id="nav-above" class="navigation">
     18                    <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
     19                    <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
     20                </div><!-- #nav-above -->
     21
     22                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     23                    <h1 class="entry-title"><?php the_title(); ?></h1>
     24
     25                    <div class="entry-meta">
     26                        <?php twentyten_posted_on(); ?>
     27                    </div><!-- .entry-meta -->
     28
     29                    <div class="entry-content">
     30                        <?php the_content(); ?>
     31                        <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
     32                    </div><!-- .entry-content -->
     33
     34<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?>
     35                    <div id="entry-author-info">
     36                        <div id="author-avatar">
     37                            <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
     38                        </div><!-- #author-avatar -->
     39                        <div id="author-description">
     40                            <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
     41                            <?php the_author_meta( 'description' ); ?>
     42                            <div id="author-link">
     43                                <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
     44                                    <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
     45                                </a>
     46                            </div><!-- #author-link -->
     47                        </div><!-- #author-description -->
     48                    </div><!-- #entry-author-info -->
     49<?php endif; ?>
     50
     51                    <div class="entry-utility">
     52                        <?php twentyten_posted_in(); ?>
     53                        <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     54                    </div><!-- .entry-utility -->
     55                </div><!-- #post-## -->
     56
     57                <div id="nav-below" class="navigation">
     58                    <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
     59                    <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
     60                </div><!-- #nav-below -->
     61
     62                <?php comments_template( '', true ); ?>
     63
     64<?php endwhile; // end of the loop. ?>
    2265
    2366            </div><!-- #content -->
Note: See TracChangeset for help on using the changeset viewer.