Everytime i go past page one on the pagination I click on my comments and its takes me to the page but no comments show up, i have to click older post to get the comments to appear but on page 1 it takes me right to the comments. Im not sure what the problem is but here is my code, any help is greatly appreciated.

this is what i have in the page

<?php wp_list_comments('per_page=23&callback=mytheme_comment', get_comments()); ?>  

<div id="paginati"><?php paginate_comments_links(); ?></div>

and this is what i have in the functions, am i missing something?

function mytheme_comment($comment, $args, $depth) {
   $GLOBALS['comment'] = $comment; ?>
   <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
     <div id="comment-<?php comment_ID(); ?>">
      <div class="comment-author vcard">

        <div id="comments-post-title"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php echo ( get_the_title($comment->comment_post_ID) ) ?></a></div>

        <div id="comments-post-author"><?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?></div>

        <div id="comments-post-date"> on <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s'), get_comment_date()) ?></a></div>

         <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php echo get_avatar($comment,$size='170',$default='<path_to_url>' ); ?></a>
      </div>  

     </div>

     </li>
<?php
        }
link|improve this question

65% accept rate
The linked you provided in a comment to Rarst's answer shows the following on the page.. 7 Responses to “Congratulations Green Bay Packers!!” - there are seven comments shown on page one, so naturally page 2 won't have any to show(you don't have enough comments for there to be any on page 2). – t31os Feb 8 '11 at 10:48
yes but its like that on every post now, some post have 3 comments some have 15 it shouldnt to the page with the comments being blank after you click it – Jeremy Love Feb 8 '11 at 16:45
In neither of those cases are there enough comments to page correctly, as per you setting per_page=23. The issue is that you have a link to a second page when it's not needed so there must be something throwing off the result of paginate_comments_links(), do you have any plugins installed that interact with comments? (tried another theme to rule out a theme issue?) – t31os Feb 10 '11 at 15:08
feedback

2 Answers

I have trouble understanding your description of the issue, could you please try to write it out more clearly?

As for comments pagination issues I'd try without custom callback at all and possibly switching to another theme (like Twenty Ten) to narrow down when problem occurs.

Update

I am not sure I am making right sense of your comment setup, but it seems something is wrong with comments display in template of your single post. There is only empty <ol class="commentlist"> </ol> output where comments should be.

link|improve this answer
feedback

i had the same issue, given by conflict with seo by yoast. if you use this plugin check the menu PERMEALINK and uncheck the Redirect ugly URL's to clean permalinks.

it worked for me,valentina

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.