diff options
Diffstat (limited to 'srcs/wordpress/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php')
| -rw-r--r-- | srcs/wordpress/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/srcs/wordpress/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php b/srcs/wordpress/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php new file mode 100644 index 0000000..14553c6 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php @@ -0,0 +1,33 @@ +<?php +/** + * The template for displaying Author info + * + * @package WordPress + * @subpackage Twenty_Twenty + * @since 1.0.0 + */ + +if ( (bool) get_the_author_meta( 'description' ) && (bool) get_theme_mod( 'show_author_bio', true ) ) : ?> +<div class="author-bio"> + <div class="author-title-wrapper"> + <div class="author-avatar vcard"> + <?php echo get_avatar( get_the_author_meta( 'ID' ), 160 ); ?> + </div> + <h2 class="author-title heading-size-4"> + <?php + printf( + /* translators: %s: Author name */ + __( 'By %s', 'twentytwenty' ), + esc_html( get_the_author() ) + ); + ?> + </h2> + </div><!-- .author-name --> + <div class="author-description"> + <?php echo wp_kses_post( wpautop( get_the_author_meta( 'description' ) ) ); ?> + <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> + <?php _e( 'View Archive <span aria-hidden="true">→</span>', 'twentytwenty' ); ?> + </a> + </div><!-- .author-description --> +</div><!-- .author-bio --> +<?php endif; ?> |
