content.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. sprintf(
  30. wp_kses(
  31. /* translators: %s: Name of current post. Only visible to screen readers */
  32. __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'varia' ),
  33. array(
  34. 'span' => array(
  35. 'class' => array(),
  36. ),
  37. )
  38. ),
  39. get_the_title()
  40. )
  41. );
  42. wp_link_pages(
  43. array(
  44. 'before' => '<div class="page-links">' . __( 'Pages:', 'varia' ),
  45. 'after' => '</div>',
  46. )
  47. );
  48. ?>
  49. </div><!-- .entry-content -->
  50. <footer class="entry-footer responsive-max-width">
  51. <?php varia_entry_footer(); ?>
  52. </footer><!-- .entry-footer -->
  53. </article><!-- #post-${ID} -->