content.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @package Apostrophe 2
  4. *
  5. */
  6. ?>
  7. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  8. <?php
  9. /*
  10. * If our posts have featured images, we'll show them in the grid.
  11. * Otherwise, we'll fall back to a grey box with an icon representing the post format.
  12. */
  13. if ( apostrophe_2_has_post_thumbnail() ) {
  14. $apostrophe_2_post_thumbnail = get_the_post_thumbnail();
  15. $apostrophe_2_has_thumbnail = 'apostrophe-2-thumb';
  16. } else {
  17. $apostrophe_2_post_thumbnail = '<span></span>';
  18. $apostrophe_2_has_thumbnail = 'apostrophe-2-nothumb';
  19. } // check for post thumbnail
  20. ?>
  21. <a class="entry-thumbnail <?php echo esc_attr( $apostrophe_2_has_thumbnail ); ?>" href="<?php echo esc_url( get_permalink() ); ?>">
  22. <?php echo wp_kses_post( $apostrophe_2_post_thumbnail ); ?>
  23. </a>
  24. <header class="entry-header">
  25. <div class="entry-meta">
  26. <?php apostrophe_2_posted_on(); ?>
  27. </div><!-- .entry-meta -->
  28. <h2 class="entry-title"><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  29. </header><!-- .entry-header -->
  30. </article><!-- #post-## -->