entry-author-bio.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * The template for displaying Author info
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Twenty
  7. * @since Twenty Twenty 1.0
  8. */
  9. if ( (bool) get_the_author_meta( 'description' ) && (bool) get_theme_mod( 'show_author_bio', true ) ) : ?>
  10. <div class="author-bio">
  11. <div class="author-title-wrapper">
  12. <div class="author-avatar vcard">
  13. <?php echo get_avatar( get_the_author_meta( 'ID' ), 160 ); ?>
  14. </div>
  15. <h2 class="author-title heading-size-4">
  16. <?php
  17. printf(
  18. /* translators: %s: Author name. */
  19. __( 'By %s', 'twentytwenty' ),
  20. esc_html( get_the_author() )
  21. );
  22. ?>
  23. </h2>
  24. </div><!-- .author-name -->
  25. <div class="author-description">
  26. <?php echo wp_kses_post( wpautop( get_the_author_meta( 'description' ) ) ); ?>
  27. <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  28. <?php _e( 'View Archive <span aria-hidden="true">&rarr;</span>', 'twentytwenty' ); ?>
  29. </a>
  30. </div><!-- .author-description -->
  31. </div><!-- .author-bio -->
  32. <?php endif; ?>