[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

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><!-- .author-title -->
  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
  39  endif;


Generated : Sat Nov 23 08:20:01 2024 Cross-referenced by PHPXref