content.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Ixion
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <div class="entry-body">
  12. <header class="entry-header">
  13. <?php
  14. if ( has_post_thumbnail() && ! is_single() ) : ?>
  15. <div class="post-thumbnail">
  16. <a href="<?php the_permalink(); ?>">
  17. <?php the_post_thumbnail( 'ixion-featured-image' ); ?>
  18. </a>
  19. </div>
  20. <?php
  21. endif;
  22. if ( ! is_single() ) {
  23. if ( 'post' === get_post_type() ) {
  24. get_template_part( 'components/post/content', 'meta' );
  25. }
  26. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  27. }
  28. ?>
  29. </header>
  30. <div class="entry-content">
  31. <?php
  32. the_content( sprintf(
  33. /* translators: %s: Name of current post. */
  34. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'ixion' ), array( 'span' => array( 'class' => array() ) ) ),
  35. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  36. ) );
  37. wp_link_pages( array(
  38. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'ixion' ),
  39. 'after' => '</div>',
  40. ) );
  41. ?>
  42. </div><!-- .entry-content -->
  43. <?php if ( is_single() ) {
  44. get_template_part( 'components/post/content', 'footer' );
  45. } ?>
  46. <?php if ( 'post' === get_post_type() ) {
  47. ixion_author_bio();
  48. } ?>
  49. </div> <!-- .entry-body -->
  50. </article><!-- #post-## -->