content-singular.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Template part for displaying posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package Blank Canvas
  8. * @since 1.0
  9. */
  10. $show_post_and_page_titles = get_theme_mod( 'show_post_and_page_titles', false );
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <?php if ( $show_post_and_page_titles ) : ?>
  14. <header class="entry-header default-max-width">
  15. <?php
  16. if ( is_singular() ) :
  17. the_title( '<h1 class="entry-title">', '</h1>' );
  18. else :
  19. the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
  20. endif;
  21. ?>
  22. </header><!-- .entry-header -->
  23. <?php endif; ?>
  24. <?php seedlet_post_thumbnail(); ?>
  25. <div class="entry-content">
  26. <?php
  27. the_content(
  28. sprintf(
  29. wp_kses(
  30. /* translators: %s: Name of current post. Only visible to screen readers */
  31. __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'blank-canvas' ),
  32. array(
  33. 'span' => array(
  34. 'class' => array(),
  35. ),
  36. )
  37. ),
  38. get_the_title()
  39. )
  40. );
  41. wp_link_pages(
  42. array(
  43. 'before' => '<div class="page-links">' . __( 'Pages:', 'blank-canvas' ),
  44. 'after' => '</div>',
  45. )
  46. );
  47. ?>
  48. </div><!-- .entry-content -->
  49. </article><!-- #post-${ID} -->