PageRenderTime 53ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 70 lines | 49 code | 14 blank | 7 comment | 3 complexity | 692c2de302fb919d6c16ce7947e05b49 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  1. <?php
  2. /**
  3. * The Template for displaying all single posts.
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Ten
  7. * @since Twenty Ten 1.0
  8. */
  9. get_header(); ?>
  10. <div id="container">
  11. <div id="content" role="main">
  12. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  13. <div id="nav-above" class="navigation">
  14. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
  15. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
  16. </div><!-- #nav-above -->
  17. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  18. <h1 class="entry-title"><?php the_title(); ?></h1>
  19. <div class="entry-meta">
  20. <?php twentyten_posted_on(); ?>
  21. </div><!-- .entry-meta -->
  22. <div class="entry-content">
  23. <?php the_content(); ?>
  24. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
  25. </div><!-- .entry-content -->
  26. <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
  27. <div id="entry-author-info">
  28. <div id="author-avatar">
  29. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
  30. </div><!-- #author-avatar -->
  31. <div id="author-description">
  32. <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
  33. <?php the_author_meta( 'description' ); ?>
  34. <div id="author-link">
  35. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
  36. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
  37. </a>
  38. </div><!-- #author-link -->
  39. </div><!-- #author-description -->
  40. </div><!-- #entry-author-info -->
  41. <?php endif; ?>
  42. <div class="entry-utility">
  43. <?php twentyten_posted_in(); ?>
  44. <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
  45. </div><!-- .entry-utility -->
  46. </div><!-- #post-## -->
  47. <div id="nav-below" class="navigation">
  48. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
  49. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
  50. </div><!-- #nav-below -->
  51. <?php comments_template( '', true ); ?>
  52. <?php endwhile; // end of the loop. ?>
  53. </div><!-- #content -->
  54. </div><!-- #container -->
  55. <?php get_sidebar(); ?>
  56. <?php get_footer(); ?>