• Resolved fernandov1982

    (@fernandov1982)


    The plugin handles well the amount parameter, but no arrow or page # is shown. I read a previous post and tryed evreythig you recommended with no result. This is the shortcode I’m using:
    [authors_list style=”4″ columns=”1″ columns_direction=”vertical” amount=”4″ pagination=”yes” only_authors=”no” show_bio=”no” show_link=”no” show_avatar=”yes” avatar_size=”20″ skip_empty=”no” orderby =”post_count” ]

    Thank you in advance, best regards.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author WPKube

    (@wpkube)

    Hi @fernandov1982

    I tried the same shortcode on my installation and it works fine.

    [authors_list style="4" columns="1" columns_direction="vertical" amount="4" pagination="yes" only_authors="no" show_bio="no" show_link="no" show_avatar="yes" avatar_size="20" skip_empty="no" orderby ="post_count" ]

    The only thing that comes to mind that maybe it’s not finding more than 4 authors.

    What happens if you set the amount parameter to 6? Does it still show 4 or does it show 6?

    Thread Starter fernandov1982

    (@fernandov1982)

    Amount parameter works well and find more authors if increased. I inspected the generated html and the div for pagination is empty. (<div class=”authors-list-pagination”></div>).

    Plugin Author WPKube

    (@wpkube)

    Hi @fernandov1982

    The pagination is generated by a native WordPress function called paginate_links, so I’m not quite sure what’s causing the problem.

    Do you have some experience with editing PHP files, if you do we can try a couple changes to figure out what’s going on.

    Thread Starter fernandov1982

    (@fernandov1982)

    Thank you for your answer. I’m a php beginner but I can edit the files.

    Plugin Author WPKube

    (@wpkube)

    File: includes/display.php
    Line: 490

    You’ll see $current_page = max(1, get_query_var('paged'));

    Below that line add:

    var_dump( $current_page, get_query_var('paged'), $total_pages );

    Then go to the page with the authors list and there should be 3 numbers shown after the list. Let me know what those numbers are.

    Thread Starter fernandov1982

    (@fernandov1982)

    It shows int(1) int(0) float(1)
    2 authors are shown as set in amount parameter but there ares 5 authors. When setting amount to a higher value it shows more authors but still no pagination.

    Thread Starter fernandov1982

    (@fernandov1982)

    I’ve found something interesting. In the sam page list author is placed there are blog post with its own pagination, well, the pagination control in the blog afects the authors list too, so, when I gos to the 2nd page of the blog, Authors List sohuws the 2nd page of authors and the 3 values you asked me to add changes their values accordingly.

    • This reply was modified 3 years, 7 months ago by fernandov1982.
    Plugin Author WPKube

    (@wpkube)

    The first number shows current page number, the 2nd one does similar but without a min limit of 1 and the third one shows the amount of pages there are.

    That third one is the important part, since it reports 1 then there’s an issue with the code that gets the total amount of users.

    That is located on line 79 of the same file.

    $total_users = $total_users['avail_roles']['author'];

    After that can you add the following:

    var_dump( count_users() );

    And let me know what’s shown on the page. This one will show up before the authors list. Should display the total and also the counts separated by the role (administrator, author, subscriber…)

    As for the pagination control for the post affecting the authors as well, yeah, both paginations use the native WordPress pagination functionality which does not differentiate between different paginated data on the page, it affects them all.

    Thread Starter fernandov1982

    (@fernandov1982)

    This is the dump:

    array(2) { [“total_users”]=> int(5) [“avail_roles”]=> array(4) { [“administrator”]=> int(2) [“author”]=> int(1) [“lector”]=> int(2) [“none”]=> int(0) } }

    Attending your last comment I guess the problem has no solution regarding the presence of two paginations in the same page. If thats true, pelase let me know so I can find another way.

    Plugin Author WPKube

    (@wpkube)

    The issue is that the pagination only gets authors for the total count used in pagination, it finds only 1 author so it doesn’t create a pagination output. We’ll get that fixed.

    As for the pagination affecting both the post pagination and author pagination, at the moment that can’t be resolved.

    If more users run into the issue we’ll figure something out and go with a custom approach for pagination instead of the WordPress approach, but I it’s a bit of an edge case scenario, the authors list needs to have enabled pagination and be on a post that is paginated, so it’s possible that we don’t get another user with that issue soon. Sorry.

    Thread Starter fernandov1982

    (@fernandov1982)

    Sorry to hear that, but thanks a lot for the effort and excelent support. Just a last thing: may be you should warn users about this restriction.

    Best regards.

    Plugin Author WPKube

    (@wpkube)

    You’re welcome and thanks for understanding.

    Best regards.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Pagination not working’ is closed to new replies.