• hi,

    i am using twenty eleven theme and i have setup a guestbook with comments funtion. i have 263 comments and would like to use pagination. i was able to install the plugin and it works, but i shows too many pages. currently there are 20 comments per page. this means that with 263 comments i have 13 pages. but the plugin is generating paginations for 263 pages, were only pages 1-13 are showing the comments and 14-263 are empty.

    can you have a look at this issue?

    as the page is currently in testing mode i can provide a link by PM.

    thanks tungsten

    https://www.ads-software.com/extend/plugins/simple-pagination/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author GeekPress

    (@geekpress)

    Try the new version !

    Thread Starter TungstenE2

    (@tungstene2)

    Tried it, but still does not work.

    you can check here: https://tinyurl.com/c8rsrbp

    any idea?

    i know this thread is quite old, but maybe it helps someone…
    from what i can see, the comment pagination counts all comments (parent AND children ) regardless of whether they are broken up into pages in the settings page. what worked for me was the following:
    a few lines below
    if( $this->options['type'] == 'comments' ) {
    change
    $total = $wp_query->comment_count;
    to
    $total = get_comment_pages_count();

    as this is the number of pages the comments are broken into according to whatever is set in settings->discussions

    and while i’m at it.
    if you put in 2 paginations on the same page (top and bottom for example , you end up with 3 paginations (if you were to put it in 3 times you’ll get even more ) so changing

    function wp_simple_comments_pagination( $args = array() )
    {
    	global $Simple_Pagination;
    	$args['type'] = 'comments';
    	echo $Simple_Pagination->generateOutput( $args );
    }

    to

    function wp_simple_comments_pagination( $args = array() )
    {
    
    	$Simple_Pagination = new Simple_Pagination();
    	$args['type'] = 'comments';
    	echo $Simple_Pagination->generateOutput( $args );
    }

    seems to eliminate that problem

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Simple Pagination] Pagination for comments – too many pages’ is closed to new replies.