Do you have a large number of Author for your Blog and want to insert author bio on each post automatically? if yes it very easy to do.
Open your functions.php file and paste the following code.
If you enjoyed this article, please consider sharing it!
Open your functions.php file and paste the following code.
function get_author_bio ($content=''){ global $post; $post_author_name=get_the_author_meta("display_name"); $post_author_description=get_the_author_meta("description"); $html="<div class='clearfix' id='about_author'>\n"; $html.="<img width='80' height='80' class='avatar' src='path of image?avatar_id="
.md5(get_the_author_email()).
"&default=".urlencode($GLOBALS['defaultavatar'])."&size=80&r=PG' alt='PG'/>\n"; $html.="<div class='author_text'>\n"; $html.="<h4>Author: <span>".$post_author_name."</span></h4>\n"; $html.= $post_author_description."\n"; $html.="</div>\n"; $html.="<div class='clear'></div>\n"; $content .= $html; return $content;}add_filter('the_content', 'get_author_bio');
That's all you have done it.
If you enjoyed this article, please consider sharing it!
You may also like to reaD: