PageRenderTime 52ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/zachisit/zachis.it-m
PHP | 67 lines | 43 code | 10 blank | 14 comment | 3 complexity | 489023cfc848720e9d223a4f90f97e02 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. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  18. <div id="nav-above" class="navigation">
  19. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
  20. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
  21. </div><!-- #nav-above -->
  22. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  23. <h1 class="entry-title"><?php the_title(); ?></h1>
  24. <div class="entry-meta">
  25. <?php twentyten_posted_on(); ?>
  26. </div><!-- .entry-meta -->
  27. <div class="entry-content">
  28. <?php the_content(); ?>
  29. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
  30. </div><!-- .entry-content -->
  31. <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
  32. <div id="entry-author-info">
  33. <div id="author-avatar">
  34. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
  35. </div><!-- #author-avatar -->
  36. <div id="author-description">
  37. <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
  38. <?php the_author_meta( 'description' ); ?>
  39. <div id="author-link">
  40. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
  41. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
  42. </a>
  43. </div><!-- #author-link -->
  44. </div><!-- #author-description -->
  45. </div><!-- #entry-author-info -->
  46. <?php endif; ?>
  47. <div class="entry-utility">
  48. <?php twentyten_posted_in(); ?>
  49. <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
  50. </div><!-- .entry-utility -->
  51. </div><!-- #post-## -->
  52. <div id="nav-below" class="navigation">
  53. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
  54. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
  55. </div><!-- #nav-below -->
  56. <?php comments_template( '', true ); ?>
  57. <?php endwhile; // end of the loop. ?>