Hi guys
I have a problem in displaying author meta in Header Element
I used your code in another topic to create shortcode, I adjusted it a little bit
function tu_custom_author_meta() {
ob_start();
global $post;
$author_id = $post->post_author;
?>
<header class="page-header">
<div class="author-meta">
<h1 class="page-title"><?php echo get_the_author_meta( 'nickname', $author_id ); ?></h1>
<div class="author-photo"> <?php echo get_avatar( $author_id ); ?></div>
<p class="author-description"><?php echo get_the_author_meta( 'description', $author_id ); ?></p>
</div>
</header>
<?php
return ob_get_clean();
}
add_shortcode( 'author_meta','tu_custom_author_meta' );
Then I added shortcode [author_meta] in Header Element. It worked, and showed up like this: http://prntscr.com/o2i5wf
However, because I use elementor to design author archive page, when the Header is active, it has an error like this: http://prntscr.com/o2i6e3. it shows only one post per page instead of 6 posts per page.
If I disable the Header, it works like normal: http://prntscr.com/o2i6px.
Could you please show me a way to fix this error, please