[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwentyone/template-parts/content/ -> content-page.php (source)

   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 WordPress
   8   * @subpackage Twenty_Twenty_One
   9   * @since Twenty Twenty-One 1.0
  10   */
  11  
  12  ?>
  13  
  14  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  15  
  16      <?php if ( ! is_front_page() ) : ?>
  17          <header class="entry-header alignwide">
  18              <?php get_template_part( 'template-parts/header/entry-header' ); ?>
  19              <?php twenty_twenty_one_post_thumbnail(); ?>
  20          </header><!-- .entry-header -->
  21      <?php elseif ( has_post_thumbnail() ) : ?>
  22          <header class="entry-header alignwide">
  23              <?php twenty_twenty_one_post_thumbnail(); ?>
  24          </header><!-- .entry-header -->
  25      <?php endif; ?>
  26  
  27      <div class="entry-content">
  28          <?php
  29          the_content();
  30  
  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  
  42      <?php if ( get_edit_post_link() ) : ?>
  43          <footer class="entry-footer default-max-width">
  44              <?php
  45              edit_post_link(
  46                  sprintf(
  47                      /* translators: %s: Post title. Only visible to screen readers. */
  48                      esc_html__( 'Edit %s', 'twentytwentyone' ),
  49                      '<span class="screen-reader-text">' . get_the_title() . '</span>'
  50                  ),
  51                  '<span class="edit-link">',
  52                  '</span>'
  53              );
  54              ?>
  55          </footer><!-- .entry-footer -->
  56      <?php endif; ?>
  57  </article><!-- #post-<?php the_ID(); ?> -->


Generated: Sun Dec 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1