views->get( 'template-parts/author-header', [
'author_name' => $author_name,
'author_docs_count' => $author_docs_count,
'avatar_tag' => $author_avatar_tag
] );
betterdocs()->views->get( 'template-parts/author-archive-doc-list', [
'post_query' => $post_query
] );
if ( $enable_pagination ) {
global $wp;
$remove_the_last_two_vars = explode( '/', $wp->request );
$new_link = home_url() .'/'. implode( '/', array_slice( $remove_the_last_two_vars, 0, ( count( $remove_the_last_two_vars ) - 2 ) ) ) . '/';
$total_pages = ceil( ( isset( $post_query->found_posts ) ? $post_query->found_posts : 0 ) / 10 );
betterdocs()->views->get(
'template-parts/pagination',
[
'total_pages' => $total_pages,
'link' => $new_link,
'current_page' => isset( $page ) ? $page : 1,
'template' => 'doc_category' //bypass the template to be used in authors template
]
);
}
?>