author-bio.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * The template for displaying Author bios
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Fifteen
  7. * @since Twenty Fifteen 1.0
  8. */
  9. ?>
  10. <div class="author-info">
  11. <h2 class="author-heading"><?php _e( 'Published by', 'twentyfifteen' ); ?></h2>
  12. <div class="author-avatar">
  13. <?php
  14. /**
  15. * Filter the author bio avatar size.
  16. *
  17. * @since Twenty Fifteen 1.0
  18. *
  19. * @param int $size The avatar height and width size in pixels.
  20. */
  21. $author_bio_avatar_size = apply_filters( 'twentyfifteen_author_bio_avatar_size', 56 );
  22. echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
  23. ?>
  24. </div><!-- .author-avatar -->
  25. <div class="author-description">
  26. <h3 class="author-title"><?php echo get_the_author(); ?></h3>
  27. <p class="author-bio">
  28. <?php the_author_meta( 'description' ); ?>
  29. <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  30. <?php printf( __( 'View all posts by %s', 'twentyfifteen' ), get_the_author() ); ?>
  31. </a>
  32. </p><!-- .author-bio -->
  33. </div><!-- .author-description -->
  34. </div><!-- .author-info -->