-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauthor-bio.php
30 lines (29 loc) · 1.07 KB
/
author-bio.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
* The template for displaying Author bios
*
* @subpackage Hawea
* @since Hawea 1.0
* @version 1.0
*/
?>
<div class="authorbox cf">
<div class="author-avatar">
<?php
$author_bio_avatar_size = apply_filters( 'hawea_author_bio_avatar_size', 120 );
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
?>
</div><!-- .author-avatar -->
<div class="author-heading">
<h3 class="author-title"><span><?php esc_html_e('Written by ', 'hawea') ?></span><?php printf( "<a href='" . esc_url(get_author_posts_url( get_the_author_meta( 'ID' ) )) . "' rel='author'>" . get_the_author() . "</a>" ); ?></h3>
<?php
$author_url = get_the_author_meta('user_url');
$to_remove = array( 'http://', 'https://' );
foreach ( $to_remove as $item ) {
$author_url = str_replace($item, '', $author_url);
}
echo '<a class="author-website" href=' . get_the_author_meta('user_url') .'> ' . $author_url . ' </a>';
?>
</div><!-- end .author-heading -->
<p class="author-bio"><?php the_author_meta( 'description' ); ?></p>
</div><!-- end .authorbox -->