you’re right, but if you don’t need pagination, for the dumber ones like me, it’s ok.
Thread Starter
fsx
(@fsx)
Number 1 was the clue. Thanks for the hint, I was blind…
Maybe I found a far more simple solution, as we already defined $num_posts in content-author.php
Just change the Template like this:
$user_info = get_userdata($user->ID);
$num_posts = count_user_posts ( $user->ID );
?>
<?php if ($num_posts != 0) echo '
<div class="author-info author-block">
<div class="author-avatar">'.get_avatar( $user->ID, 68 ).'</div>
<div class="author-description"><h2><a href="'.get_author_posts_url($user->ID).'">'.$user_info->display_name.'</a></h2>
<p>'.$user_info->description.'</p>
<p class="author-beitraege"><a href="'.get_author_posts_url($user->ID).'">Lese'.$user_info->display_name.'s Beiträge</a></p>
</div>
</div>';
?>