[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwentyone/template-parts/post/ -> author-bio.php (source)

   1  <?php
   2  /**
   3   * The template for displaying author info below posts.
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Twenty_One
   7   * @since Twenty Twenty-One 1.0
   8   */
   9  
  10  ?>
  11  <?php if ( (bool) get_the_author_meta( 'description' ) && post_type_supports( get_post_type(), 'author' ) ) : ?>
  12      <div class="author-bio <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>">
  13          <?php echo get_avatar( get_the_author_meta( 'ID' ), '85' ); ?>
  14          <div class="author-bio-content">
  15              <h2 class="author-title">
  16              <?php
  17              printf(
  18                  /* translators: %s: Author name. */
  19                  esc_html__( 'By %s', 'twentytwentyone' ),
  20                  get_the_author()
  21              );
  22              ?>
  23              </h2>
  24              <p class="author-description"> <?php the_author_meta( 'description' ); ?></p><!-- .author-description -->
  25              <?php
  26              printf(
  27                  '<a class="author-link" href="%1$s" rel="author">%2$s</a>',
  28                  esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  29                  sprintf(
  30                      /* translators: %s: Author name. */
  31                      esc_html__( 'View all of %s\'s posts.', 'twentytwentyone' ),
  32                      get_the_author()
  33                  )
  34              );
  35              ?>
  36          </div><!-- .author-bio-content -->
  37      </div><!-- .author-bio -->
  38  <?php endif; ?>


Generated: Fri May 7 01:00:04 2021 Cross-referenced by PHPXref 0.7.1