First: why abuse the author.php
template file in this way? I would suggest that you consider creating a custom Page template for this output.
Second: if you’re using multiple queries, it would probably be helpful to give each query a unique variable. (Personally, I would give each query a descriptive variable name, rather than just a unique variable name.)
Third: archive pagination gets tricky when using custom queries. There’s a “hackish” way to make it work, though:
- Move the default query into a temporary variable:
e.g.
<?php
global $wp_query;
$original_query = $wp_query
?>
- Nullify the default query:
e.g.
<?php
$wp_query = null;
?>
- Move your custom query into the global variable:
e.g.
<?php
$wp_query = $custom_query;
?>
- After you output your pagination template tags, restore the original query:
e.g.
<?php
$wp_query = $original_query;
?>
This method will output pagination using whatever query you apply to the global $wp_query
.