page-network.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * The template for displaying all single posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Twenty_One
  9. * @since Twenty Twenty-One 1.0
  10. */
  11. get_header();
  12. /* Start the Loop */
  13. while ( have_posts() ) :
  14. the_post();
  15. ?>
  16. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  17. <?php if ( ! is_front_page() ) : ?>
  18. <header class="entry-header alignwide">
  19. <?php get_template_part( 'template-parts/header/entry-header' ); ?>
  20. <?php twenty_twenty_one_post_thumbnail(); ?>
  21. </header><!-- .entry-header -->
  22. <?php elseif ( has_post_thumbnail() ) : ?>
  23. <header class="entry-header alignwide">
  24. <?php twenty_twenty_one_post_thumbnail(); ?>
  25. </header><!-- .entry-header -->
  26. <?php endif; ?>
  27. <div class="entry-content">
  28. <?php
  29. wpmu_list_sites();
  30. the_content();
  31. wp_link_pages(
  32. array(
  33. 'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
  34. 'after' => '</nav>',
  35. /* translators: %: Page number. */
  36. 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
  37. )
  38. );
  39. ?>
  40. </div><!-- .entry-content -->
  41. <?php if ( get_edit_post_link() ) : ?>
  42. <footer class="entry-footer default-max-width">
  43. <?php
  44. edit_post_link(
  45. sprintf(
  46. /* translators: %s: Name of current post. Only visible to screen readers. */
  47. esc_html__( 'Edit %s', 'twentytwentyone' ),
  48. '<span class="screen-reader-text">' . get_the_title() . '</span>'
  49. ),
  50. '<span class="edit-link">',
  51. '</span>'
  52. );
  53. ?>
  54. </footer><!-- .entry-footer -->
  55. <?php endif; ?>
  56. </article><!-- #post-<?php the_ID(); ?> -->
  57. <?php endwhile; // End of the loop.
  58. get_footer();