Ei kuvausta

content-page.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Template part for displaying page content in page.php
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package XShop
  8. */
  9. $xshop_page_header = get_theme_mod('xshop_page_header','show');
  10. ?>
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12. <?php if( $xshop_page_header == 'show' || ( $xshop_page_header == 'hide-home' && !is_front_page() ) ): ?>
  13. <header class="entry-header page-header">
  14. <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  15. </header><!-- .entry-header -->
  16. <?php endif; ?>
  17. <?php xshop_post_thumbnail(); ?>
  18. <div class="entry-content">
  19. <?php
  20. the_content();
  21. wp_link_pages(
  22. array(
  23. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'xshop' ),
  24. 'after' => '</div>',
  25. )
  26. );
  27. ?>
  28. </div><!-- .entry-content -->
  29. <?php if ( get_edit_post_link() ) : ?>
  30. <footer class="entry-footer">
  31. <?php
  32. edit_post_link(
  33. sprintf(
  34. wp_kses(
  35. /* translators: %s: Name of current post. Only visible to screen readers */
  36. __( 'Edit <span class="screen-reader-text">%s</span>', 'xshop' ),
  37. array(
  38. 'span' => array(
  39. 'class' => array(),
  40. ),
  41. )
  42. ),
  43. wp_kses_post( get_the_title() )
  44. ),
  45. '<span class="edit-link">',
  46. '</span>'
  47. );
  48. ?>
  49. </footer><!-- .entry-footer -->
  50. <?php endif; ?>
  51. </article><!-- #post-<?php the_ID(); ?> -->