content.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * @package Publication
  4. */
  5. ?>
  6. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7. <?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
  8. <a class="post-thumbnail" href="<?php echo esc_url( get_permalink() ); ?>">
  9. <?php the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) ); ?>
  10. </a>
  11. <?php endif; ?>
  12. <header class="entry-header">
  13. <?php if ( 'post' == get_post_type() ) : ?>
  14. <div class="entry-meta">
  15. <?php publication_categories(); ?>
  16. </div><!-- .entry-meta -->
  17. <?php endif; ?>
  18. <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
  19. </header><!-- .entry-header -->
  20. <div class="entry-summary">
  21. <?php
  22. if ( strpos( $post->post_content, '<!--more' ) ) {
  23. the_content( sprintf(
  24. /* translators: %s: Name of current post. */
  25. wp_kses( __( 'Continue reading %s', 'publication' ), array( 'span' => array( 'class' => array() ) ) ),
  26. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  27. ) );
  28. } else {
  29. the_excerpt();
  30. }
  31. ?>
  32. </div><!-- .entry-summary -->
  33. </article><!-- #post-## -->