content.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <div class="post-header">
  2. <?php if ( has_post_thumbnail() ) : ?>
  3. <div class="featured-media">
  4. <?php if( is_sticky() ) { ?> <span class="sticky-post"><?php _e('Sticky post', 'hemingway'); ?></span> <?php } ?>
  5. <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
  6. <?php the_post_thumbnail('post-image'); ?>
  7. <?php if ( !empty(get_post(get_post_thumbnail_id())->post_excerpt) ) : ?>
  8. <div class="media-caption-container">
  9. <p class="media-caption"><?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?></p>
  10. </div>
  11. <?php endif; ?>
  12. </a>
  13. </div> <!-- /featured-media -->
  14. <?php endif; ?>
  15. <h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  16. <div class="post-meta">
  17. <span class="post-date"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_time(get_option('date_format')); ?></a></span>
  18. <span class="date-sep"> / </span>
  19. <span class="post-author"><?php the_author_posts_link(); ?></span>
  20. <span class="date-sep"> / </span>
  21. <?php comments_popup_link( '<span class="comment">' . __( '0 Comments', 'hemingway' ) . '</span>', __( '1 Comment', 'hemingway' ), __( '% Comments', 'hemingway' ) ); ?>
  22. <?php if( is_sticky() && !has_post_thumbnail() ) { ?>
  23. <span class="date-sep"> / </span>
  24. <?php _e('Sticky', 'hemingway'); ?>
  25. <?php } ?>
  26. <?php if ( current_user_can( 'manage_options' ) ) { ?>
  27. <span class="date-sep"> / </span>
  28. <?php edit_post_link(__('Edit', 'hemingway')); ?>
  29. <?php } ?>
  30. </div>
  31. </div> <!-- /post-header -->
  32. <div class="post-content">
  33. <?php the_content(); ?>
  34. <?php wp_link_pages(); ?>
  35. </div> <!-- /post-content -->
  36. <div class="clear"></div>