content.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Template part for displaying posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package WordPress
  8. * @subpackage Varia
  9. * @since 1.0.0
  10. */
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <header class="entry-header responsive-max-width">
  14. <?php
  15. if ( is_sticky() && is_home() && ! is_paged() ) {
  16. printf( '<span class="sticky-post">%s</span>', _x( 'Featured', 'post', 'varia' ) );
  17. }
  18. if ( is_singular() ) :
  19. the_title( '<h1 class="entry-title">', '</h1>' );
  20. else :
  21. the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
  22. endif;
  23. ?>
  24. </header><!-- .entry-header -->
  25. <?php varia_post_thumbnail(); ?>
  26. <div class="entry-content">
  27. <?php
  28. the_content();
  29. wp_link_pages(
  30. array(
  31. 'before' => '<div class="page-links">' . __( 'Pages:', 'varia' ),
  32. 'after' => '</div>',
  33. )
  34. );
  35. ?>
  36. </div><!-- .entry-content -->
  37. <footer class="entry-footer responsive-max-width">
  38. <?php varia_entry_footer(); ?>
  39. </footer><!-- .entry-footer -->
  40. </article><!-- #post-${ID} -->