M Ureeb
asked 5 years ago

i am using same version of DW Focus as this website http://www.pakistantoday.com.pk/2015/07/25/national/khan-why-should-i-apologise-pm-should-says-sorry/

  1. i want my author name to be linked as in this website and also need to change size of the author avatar on the left of the post.

  2. i need some space after author info + date and the sharing options like in the PakistanToday
1 Answers
DominicStaff
answered 5 years ago

Hi,
Solution 1 (Screenshot)
If you want to display the author section as this site, you can do as the following:

  • Open the functions.php file, remove from line 442 to line 468.
  • Add the following code under line 426:

    <div class="co-author">
    <h2 class="author-title"><?php the_author_posts_link(); ?> </h2>
    <p class="author-description"><?php the_author_meta('description'); ?></p>
    </div>
  • Add the following code to the style.css file:
.single .site-content>.hentry .entry-action .co-author {
    margin-bottom: 50px;
}
.single .site-content>.hentry .entry-action .co-author .author-title a {
    color: #000;
    font-size: 14px;
    text-shadow: 0 0 0 #000;
}

.single .site-content>.hentry .entry-action .co-author .author-description {
    font-size: 11px;
}
.single .site-content>.hentry .entry-action .co-author h2 {
    line-height: 15px;
}

Solution 2 (Screenshot)

  • Open the functions.php file, remove from line 442 to line 468.
  • Open the content-single.php file then add the following code under line 25:
<footer class="entry-meta entry-meta-bottom"> 
<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>
<p class="author-description"><?php the_author_meta('description'); ?></p>
</div><!-- .author-info -->
</footer>
  • Add the following code to the style.css file:
.single .site-content>.hentry footer.entry-meta {
    clear: none;
    width: 150px;
    border: none;
    float: left;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}
.single .site-content>.hentry footer.entry-meta .author-info {
    border: none;
    width: 100%;
}
.single .site-content>.hentry footer.entry-meta .author-info .author-description {
    margin-left: 0px;
    margin-top: 10px;
}

Hope this helps !

Powered by DW Question & Answer Pro