1. <?php
  2. /**
  3. * The Template for displaying all single posts.
  4. */
  5. get_header(); ?>
  6. <div id="container">
  7. <div id="content" role="main">
  8. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  9. <div id="nav-above" class="navigation">
  10. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'smartone' ) . '</span> %title' ); ?></div>
  11. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'smartone' ) . '</span>' ); ?></div>
  12. </div><!-- #nav-above -->
  13. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  14. <h1 class="entry-title"><?php the_title(); ?></h1>
  15. <div class="entry-meta">
  16. <?php smartone_posted_on(); ?>
  17. <?php edit_post_link( __( 'Edit', 'smartone' ), '<span class="edit-link">', '</span>' ); ?>
  18. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'smartone' ), __( '1 Comment', 'smartone' ), __( '% Comments', 'smartone' ) ); ?></span>
  19. </div><!-- .entry-meta -->
  20. <div class="entry-content">
  21. <?php the_content(); ?>
  22. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'smartone' ), 'after' => '</div>' ) ); ?>
  23. </div><!-- .entry-content -->
  24. <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
  25. <div id="entry-author-info">
  26. <div id="author-avatar">
  27. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'smartone_author_bio_avatar_size', 60 ) ); ?>
  28. </div><!-- #author-avatar -->
  29. <div id="author-description">
  30. <h2><?php printf( esc_attr__( 'About %s', 'smartone' ), get_the_author() ); ?></h2>
  31. <?php the_author_meta( 'description' ); ?>
  32. <div id="author-link">
  33. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
  34. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'smartone' ), get_the_author() ); ?>
  35. </a>
  36. </div><!-- #author-link -->
  37. </div><!-- #author-description -->
  38. </div><!-- #entry-author-info -->
  39. <?php endif; ?>
  40. <div class="entry-utility">
  41. <?php if ( count( get_the_category() ) ) : ?>
  42. <span class="cat-links">
  43. <?php printf( __( '%2$s', 'smartone' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
  44. </span>
  45. <?php endif; ?>
  46. <?php
  47. $tags_list = get_the_tag_list( '', ', ' );
  48. if ( $tags_list ):
  49. ?>
  50. <span class="tag-links">
  51. <?php printf( __( ' %2$s', 'smartone' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
  52. </span>
  53. <?php endif; ?>
  54. </div><!-- .entry-utility -->
  55. </div><!-- #post-## -->
  56. <div id="nav-below" class="navigation">
  57. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'smartone' ) . '</span> %title' ); ?></div>
  58. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'smartone' ) . '</span>' ); ?></div>
  59. </div><!-- #nav-below -->
  60. <?php comments_template( '', true ); ?>
  61. <?php endwhile; // end of the loop. ?>
  62. </div><!-- #content -->
  63. </div><!-- #container -->
  64. <?php get_footer(); ?>