Austin Tedesco
asked 5 years ago

Hi,
Is there any way I can get the author bio to show up at the bottom of posts in DW Focus? It shows up on the author page, but I’d like it on the author’s posts as well.

Thank you!

1 Answers
DominicStaff
answered 5 years ago

If you want to display the Author info like our demo, you can do as the following:
Open the content-single.php file. remove all the code then add the new following code:

       <?php
/*
* The template for displaying content on the search page.
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php dw_focus_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<?php if( has_post_thumbnail() && ! has_post_format('video') && ! has_post_format('audio') && ! has_post_format('gallery') ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail(''); ?>
</div>
<?php endif; ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'dw_focus' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php dw_focus_post_actions(); ?>
<footer class="entry-meta entry-meta-bottom">
<?php if ( get_the_author_meta( 'description' ) ) : ?>
<div class="author-info">
<div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 90 ); ?>
</div><!-- .author-avatar -->
<div class="author-description">

<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="description"><?php the_author_meta( 'description' ); ?></p>
</div><!-- .author-description -->
</div><!-- .author-info -->
<?php endif; ?>
</footer>
</article><!-- #post-<?php the_ID(); ?> -->

Notice: To change the author info, you can log in to Dashboard > User, find the Contact info section.
See the screenshot: 

Powered by DW Question & Answer Pro