How display authors in blog posts with Icon10

I have multiple authors on my blog. Icon10 is the stack. Unfortunately, the author is not displaying at all even though we are showing the entire post.
I can’t find a place to activate display of the author and/or their picture.
Thanks.
M. :slight_smile:

Hi There,

Thanks for writing in! To display the post author under the date in your post meta, since the child theme is set up, please add the following code in your child theme’s functions.php file

// Custom Entry Meta
// =============================================================================

if ( ! function_exists( 'x_icon_entry_meta' ) ) :
  function x_icon_entry_meta() {

    $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',
      esc_attr( get_the_date( 'c' ) ),
      esc_html( get_the_date() )
    );

    //
    // Author.
    //

    $author = sprintf( '<br/><span>%s</span>',
      get_the_author()
    );

    if ( x_does_not_need_entry_meta() ) {
      return;
    } else {
      printf( '<p class="p-meta">%1$s%2$s</p>',
        $date,
        $author
      );
    }

  }
endif;

We would loved to know if this has work for you. Thank you.

Perfect, you’re great! Thank you so much :smiley:

You’re welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.