content-page.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Template part for displaying page content in page.php.
  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() ) { ?>
  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 the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  21. </header><!-- .entry-header -->
  22. <div class="entry-content">
  23. <?php
  24. the_content();
  25. wp_link_pages( array(
  26. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'scratchpad' ),
  27. 'after' => '</div>',
  28. 'link_before' => '<span>',
  29. 'link_after' => '</span>',
  30. ) );
  31. ?>
  32. </div><!-- .entry-content -->
  33. <footer class="entry-footer">
  34. <?php
  35. edit_post_link(
  36. sprintf(
  37. /* translators: %s: Name of current post */
  38. esc_html__( 'Edit %s', 'scratchpad' ),
  39. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  40. ),
  41. '<span class="edit-link">',
  42. '</span>'
  43. );
  44. ?>
  45. </footer><!-- .entry-footer -->
  46. </article><!-- #post-## -->