How to display all comments in special comments page?
-
I am using a mobile them called mobilepress. The theme is good but an issue about it arises when I have multiple comments. I am also using the wp-paged-comments plugin and this has a bad effect on the mobile site.
The issue is that mobilepress gives the comments a different page to display them on, seperate from the post, but when I do I get the wp-paged-comments interfering and it cuts the comments off to a set amount per page I have set it to, this case 15. I have tried using the
<?php paginate_comments_links(); ?>
in the comment section and while it looks like its paging the comments, it does not let me go to the second, third, or whatever page of the comments; it just takes me back to the post.So what I am looking is for a way or code to display all of the comments at once, which would overwrite the wp-paged-comments plugin settings for the mobile version of the site. For reference, here is what I have for the comment section so far;
<?php if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if (!empty($post->post_password)) { if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { ?> <div class="post oneline"> <p>This is a password protected post. Please enter the password to view comments.</p> </div> <?php return; } } ?> <div id="infoblock"> <h3><?php comments_number('No Responses', 'One Response', '% Responses' ); ?></h3> </div> <?php if ($comments): ?> <?php foreach ($comments as $comment): ?> <div class="post"> <p><cite><?php comment_author_link() ?></cite> says:</p> <?php comment_text() ?> <?php if ($comment->comment_approved == '0') : ?> <p><em>Your comment is awaiting moderation, please do not re-post.</em></p> <?php endif; ?> <p class="singleline commentfoot">Posted on <?php comment_date('F jS, Y') ?></p> </div> <?php endforeach; ?> <?php else: ?> <?php if ('open' == $post->comment_status): ?> <div class="post oneline"> <p>Be the first to <a href="<?php the_permalink() ?><?php mopr_check_permalink(); ?>postcomment=true">leave a comment</a>.</p> </div> <?php else: ?> <div class="post oneline"> <p>Comments are closed on this post.</p> </div> <?php endif; ?> <?php endif; ?> <div id="postfoot"> <p><a href="<?php the_permalink() ?>">« Back To Post</a></p> </div> <div id="comments"> <p><a href="<?php the_permalink() ?><?php mopr_check_permalink(); ?>postcomment=true">Post a comment.</a></p> </div>
- The topic ‘How to display all comments in special comments page?’ is closed to new replies.