Chuck Pearson
asked 9 years ago

How can I show the author bio box on DW Jason for blog posts? Thanks.

2 Answers
Michels Heff
answered 9 years ago

I see that DW Jason doesn’t have this feature yet now. Ohm, think that is good idea to add in the next version of the theme.

DominicStaff
answered 9 years ago

Hi,
To resolve this issue, you can add do as the following:
– Open the single.php file in the folder path “wp-content\themes\dw-jason”. Please add the following code to the line 30 or line 51.

<!--BEGIN .author-bio-->
<div class="author-bio">
<?php echo get_avatar( get_the_author_meta('email'), '90' ); ?>
<div class="author-info">
<h2><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"><?php echo get_the_author(); ?></a></h2>
<p class="author-description"><?php the_author_meta('description'); ?></p>
<p>Website: <a href="<?php the_author_meta('user_url');?>"><?php the_author_meta('user_url');?></a></p>
<ul class="icons">
<?php
$rss_url = get_the_author_meta( 'rss_url' );
if ( $rss_url && $rss_url != '' ) {
echo '<li class="rss"><a href="' . esc_url($rss_url) . '"></a></li>';
}

$google_profile = get_the_author_meta( 'google_profile' );
if ( $google_profile && $google_profile != '' ) {
echo '<li class="google"><a href="' . esc_url($google_profile) . '" rel="author"></a></li>';
}

$twitter_profile = get_the_author_meta( 'twitter_profile' );
if ( $twitter_profile && $twitter_profile != '' ) {
echo '<li class="twitter"><a href="' . esc_url($twitter_profile) . '"></a></li>';
}

$facebook_profile = get_the_author_meta( 'facebook_profile' );
if ( $facebook_profile && $facebook_profile != '' ) {
echo '<li class="facebook"><a href="' . esc_url($facebook_profile) . '"></a></li>';
}

$linkedin_profile = get_the_author_meta( 'linkedin_profile' );
if ( $linkedin_profile && $linkedin_profile != '' ) {
echo '<li class="linkedin"><a href="' . esc_url($linkedin_profile) . '"></a></li>';
}
?>
</ul>
</div>
<!--END .author-bio-->
</div>

– Log in to Dashboard > Appearance > Editor, then add the following code to the style.css file:

.single-post .hentry .author-bio {
border: 1px solid #ddd;
margin-top: 30px;
min-height: 90px;
padding: 20px;
}
.single-post .hentry .author-bio .avatar {
float: left;
}
.single-post .hentry .author-bio .author-info h3 {
font-size: 14px;
font-weight: normal;
line-height: 20px;
margin-top: 0;
text-shadow: 0 0 0 #000;
}
.single-post .hentry .author-bio .author-info {
margin-left: 110px;
}
.single-post .author-bio .author-description {
margin-bottom: 0;
}

Note: to display the author bio, you need to add the description to the Biographical Info section in the Dashboard > User. 
Hope this helps !

Chuck Pearson
replied 9 years ago

That worked, thanks! The CSS appears to be wrong. If you remove the .hentry from all lines it works.

Dominic Staff
replied 9 years ago

Yup ! Thank for your feedback.

Powered by DW Question & Answer Pro