Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get Author Data
- $author = get_the_author();
- $author_description = get_the_author_meta( 'description' );
- $author_url = esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
- $author_avatar = get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'wpex_author_bio_avatar_size', 75 ) );
- // Only display if author has a description
- if ( $author_description ) : ?>
- <div class="author-info clr">
- <h4 class="heading"><span><?php printf( esc_html__( 'Written by %s', 'text_domain' ), esc_html( $author ) ); ?></span></h4>
- <div class="author-info-inner clr">
- <?php if ( $author_avatar ) { ?>
- <div class="author-avatar clr">
- <a href="<?php echo esc_url( $author_url ); ?>" rel="author">
- <?php echo $author_avatar; ?>
- </a>
- </div><! - .author-avatar →
- <?php } ?>
- <div class="author-description">
- <p><?php echo wp_kses_post( $author_description ); ?></p>
- <p><a href="<?php echo esc_url( $author_url ); ?>" title="<?php esc_html_e( 'View all author posts', 'text_domain' ); ?>"><?php esc_html_e( 'View all author posts', 'text_domain' ); ?> →</a></p>
- </div><! - .author-description →
- </div><! - .author-info-inner →
- </div><! - .author-info →
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement