How to display author info under a single post

Hi there,

awesome theme! Just having a little issue and yes, I checked the other posts in the forum and tried them.

My issue: I want to display the author info including a picture above a single blog post. I activated it at the customizer and also added different code lines to my functions.php but it wont be displayed.

Could you have a look at?

The site: philippsteuer.de

Thanks so much & all the best
Philipp

Same issue here. I also want to add the author box info automatically (e.g. at the end of a blog post). I know you can set it manually via short code. Any help on this would be most helpful.

I like the theme too but I miss standard custom options on a single post or single portfolio element. Here other themes give you out of the box way more flexibility. Strange that these basic things (like to have author info yes/no) are not provided and we have to manually mess with the code.

1 Like

Hi guys,

To add an author box in all single post, you can add the code below in your child theme’s functions.php file.


function add_author() {
  if(is_singular('post')) {
      echo do_shortcode('[author title="About the Author"]');
  }
}

add_action( 'x_before_the_content_begin', 'add_author', 10 );

If you would like it below your post, you can change x_before_the_content_begin with x_after_the_content_end

https://theme.co/apex/forum/t/customizations-actions-and-filters-in-x/208

Hope that helps.

Thanks Paul - but it doesnt work:

–> yeah, it pastes the shortcode under the teaser image but the shortcode doesnt trigger anything. Any idea whats wrong?

Thanks!

Hello There,

Thanks for updating in! Please have the code updated and make use of this code instead:

function add_author() {
  if(is_singular('post')) {
      echo do_shortcode('[x_author title="About the Author"]');
  }
}

add_action( 'x_before_the_content_begin', 'add_author', 10 );

If that doesn’t work out, could you please give us access to your WP dashboard so that we can take a closer look?

Please let us know how it goes.

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