Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Paginate list of portfolios in author’s archive

Home / Forums / Virtue Theme / Paginate list of portfolios in author’s archive

This topic is: Not a support question
[Not a support question]
Posted in: Virtue Theme
January 27, 2019 at 1:50 pm

Hi Ben,

I created custom author pages, where both authors portfolios are displayed and authors posts. I would like to paginate results, but paginate links redirect to homepage, do you know where might be the problem?

Example archive:
e/author/svetlanapolyakova/

This author has 16 pages of portfolios.

I used this code:
<div class="pagination">
<?php
$url = 'https://&#039; . $_SERVER['SERVER_NAME'];
$author = get_the_author_meta('user_nicename', $curauth->ID);

echo paginate_links( array(
'base' => $url . '/author/%_%',
'total' => $wp_query->max_num_pages,
'current' => max( 1, get_query_var( 'paged' ) ),
'format' => $author . '/?paged=%#%',
'show_all' => false,
'type' => 'plain',
'end_size' => 2,
'mid_size' => 1,
'prev_next' => true,
'prev_text' => sprintf( '<i></i> %1$s', __( 'Новее', 'text-domain' ) ),
'next_text' => sprintf( '%1$s <i></i>', __( 'Старее', 'text-domain' ) ),
'add_args' => false,
'add_fragment' => '',
) );

?>
</div>

Thanks!

  • The forum ‘Virtue Theme’ is closed to new topics and replies.