content-page.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Sakurairo
  8. */
  9. ?>
  10. <article id="post-<?php echo esc_attr(get_the_ID()); ?>" <?php post_class(); ?>>
  11. <?php
  12. if (should_show_title()) { ?>
  13. <header class="entry-header">
  14. <?php
  15. $title_style = get_post_meta(get_the_ID(), 'title_style', true);
  16. echo '<h1 class="entry-title" style="' . esc_attr($title_style) . '">' . esc_html(get_the_title()) . '</h1>';
  17. ?>
  18. </header><!-- .entry-header -->
  19. <?php } ?>
  20. <?php get_template_part('layouts/sidebox'); ?>
  21. <div class="entry-content">
  22. <?php
  23. the_content('', true);
  24. wp_link_pages([
  25. 'before' => '<div class="page-links">' . esc_html__('Pages:', 'sakurairo'),
  26. 'after' => '</div>',
  27. ]);
  28. ?>
  29. </div><!-- .entry-content -->
  30. <footer class="entry-footer">
  31. <?php
  32. edit_post_link(
  33. sprintf(
  34. /* translators: %s: Name of current post */
  35. esc_html__('Edit %s', 'sakurairo'),
  36. '<span class="screen-reader-text">' . esc_html(get_the_title()) . '</span>'
  37. ),
  38. '<span class="edit-link">',
  39. '</span>'
  40. );
  41. ?>
  42. </footer><!-- .entry-footer -->
  43. </article><!-- #post-## -->