Recently I bought a template from I have an issue with this template. I am unable to display the author name on the blog post. I have tried every different option but none are working. Also tried to edit the functions.php, theme-function.php pages by adding the_author() function but no luck. Could you guys please help me out. The code where the author name is missing is defined below.

if ( ! function_exists( 'ishyoboy_get_post_details' ) ) {
  function ishyoboy_get_post_details(){
    $return = '';
      global $post;
        get_author_posts_url( $author_id );
        ob_start(); ?>
        <span class="ish-blog-post-details">
          <span><?php _e( 'by', 'ishyoboy'); ?></span> 
                  <?php echo the_author_posts_link(); ?>
          $return .= ob_get_contents();
          return $return;

Ideally the author name should be displayed in

  <span><?php _e( 'by', 'ishyoboy'); ?></span> 
  <?php echo the_author_posts_link(); ?>

but its not.

Thank you

Read more here: How to add the author name in wordpress manually through coding


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: