Victor Quesada
asked 6 years ago

how i can put author info on left side of the post, like in older versions of the theme?
it is possible to have a authors list page in alfabetical order?
thanks

1 Answers
DominicStaff
answered 6 years ago

To resolve this issue, you can open the template-tags.php file and add the following code under line 48:

    <div class="co-author">

 <span class="title-action"><?php _e('Authors','dw_focus') ?></span>
 <?php if( function_exists( 'coauthors_posts_links' ) ) : ?>

 <?php $coauthors = get_coauthors(); ?>

 <?php foreach( $coauthors as $coauthor ): ?>

 <div class="author-info">

 <?php if( get_the_post_thumbnail( $coauthor->ID ) ) : ?>

 <?php echo get_the_post_thumbnail( $coauthor->ID , array(32,32) ); ?>

 <?php else : ?>

 <?php echo get_avatar( $coauthor->ID, 32); ?>

 <?php endif; ?>

 <a class="author-name" href="<?php echo esc_url( get_author_posts_url($coauthor->ID,$coauthor->user_nicename) ); ?>" rel="author"><?php echo $coauthor->display_name ?></a>

 </div><!-- .author-info -->

 <?php endforeach; ?>

 <?php else : ?>

 <div class="author-info">

 <?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>

 <a class="author-name" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"><?php echo get_the_author(); ?></a></h2>

 </div><!-- .author-info -->

 <?php endif; ?>

 </div>

Then add the following code to the style.css file:

.single #main>.post .entry-sidebar .author-info {

 border: none;

 background: none;

 padding: 0;

 margin: 0;

}

Hope this helps!

Powered by DW Question & Answer Pro