content-single.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Scratchpad
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php if ( has_post_thumbnail() && ! post_password_required() ) { ?>
  12. <div class="featured-image">
  13. <span>
  14. <?php get_template_part( 'images/inline', 'paperclip.svg' ); ?>
  15. <?php the_post_thumbnail( 'scratchpad-featured' ); ?>
  16. </span>
  17. </div><!-- .featured-image -->
  18. <?php } ?>
  19. <header class="entry-header">
  20. <?php scratchpad_categories(); ?>
  21. <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  22. <div class="entry-meta">
  23. <?php scratchpad_post_format(); ?>
  24. <?php scratchpad_posted_on(); ?>
  25. <?php
  26. edit_post_link(
  27. sprintf(
  28. /* translators: %s: Name of current post */
  29. esc_html__( 'Edit %s', 'scratchpad' ),
  30. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  31. ),
  32. '<span class="edit-link"><span class="sep">&bull;</span>',
  33. '</span>'
  34. );
  35. ?>
  36. </div><!-- .entry-meta -->
  37. </header><!-- .entry-header -->
  38. <div class="entry-content">
  39. <?php
  40. the_content( sprintf(
  41. /* translators: %s: Name of current post. */
  42. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'scratchpad' ), array( 'span' => array( 'class' => array() ) ) ),
  43. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  44. ) );
  45. wp_link_pages( array(
  46. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'scratchpad' ),
  47. 'after' => '</div>',
  48. 'link_before' => '<span>',
  49. 'link_after' => '</span>',
  50. ) );
  51. ?>
  52. </div><!-- .entry-content -->
  53. <?php get_template_part( 'template-parts/author-bio' ); ?>
  54. <footer class="entry-footer">
  55. <?php scratchpad_entry_footer(); ?>
  56. </footer><!-- .entry-footer -->
  57. </article><!-- #post-## -->