[Plugin: WP-Paginate] Comments to be paginated not working
-
Hello, you have to excuse my English, but I have a problem with the layout of comments. The official FAQ explains to replace this:
<div class="navigation"> <div class="alignleft"><?php previous_comments_link() ?></div> <div class="alignright"><?php next_comments_link() ?></div> </div>
With:
<?php if(function_exists('wp_paginate_comments')) { wp_paginate_comments(); } ?>
In my comment.php there is no code given. here’s my commnet.php
<?php // Do not delete these lines if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if (!empty($post->post_password)) { // if there's a password if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie ?> <h3><?php _e("Questo post è protetto da password. Inserisci la password per visualizzare i commenti."); ?></h3> <?php return; } } $commentalt = '_alt'; $commentcount = 1; ?> <div id="comment-temps"> <h2><?php comments_number('Nessun utente a', '1 utente ha', '% utenti hanno' );?> commentato " <?php the_title(); ?> " </h2> <p><!-- google adsense --></p> <div class="post-fixed"></div> <?php if ($comments) : ?> <?php foreach ($comments as $comment) : ?> <div class="com-box<?php echo $commentalt; ?>"> <div class="author_avatar"><?php if(function_exists('get_avatar')) { echo get_avatar($comment, '40'); } ?></div> <div class="com-box-small"> <div class="author_com"><?php comment_author_link(); ?> ha detto,</div> <div class="author_date"> in <?php comment_date('F jS, Y') ?> alle <?php comment_time() ?> <?php edit_comment_link('modifica','',''); ?> </div> <div class="author_com_text"> <?php comment_text() ?> </div> </div></div> <div class="com-fixed"></div> <?php ($commentalt == "_alt")?$commentalt="":$commentalt="_alt"; $commentcount++; ?> <?php endforeach; /* end for each comment */ ?> <?php endif; ?> <?php if ('open' == $post->comment_status) : ?> <?php if (get_option('comment_registration') && !$user_ID) : ?> <?php else : ?> <?php if ($comment->comment_approved == '0') : ?> <p><?php _e("Your comment is awaiting moderation."); ?></p> <?php endif; ?> <div class="com-fixed"></div> <p><!-- google adsense --></p> <h3>Commenta</h3> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> <?php if (!$user_ID) : ?> <div id="comment-box"> <p><input name="author" type="text" value="<?php echo $comment_author; ?>"/> Nome (obbligatorio)</p> <p><input name="email" type="text" value="<?php echo $comment_author_email; ?>"/> Email (obbligatorio)</p> <p><input name="url" type="text" value="<?php echo $comment_author_url; ?>"/> Sito Web (facoltativo)</p> </div> <?php endif; ?> <div id="comment-area"> <p><textarea name="comment" cols="50%" rows="8"></textarea></p> <p><input name="submit" type="submit" value="Invia il commento" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p> </div> </form> <span class="rssfeed"> <?php comments_rss_link('Avvisami via RSS della notifica di nuovi commenti'); ?></span> <?php endif; // If registration required and not logged in ?> <?php endif; // if you delete this the sky will fall on your head ?> </div>
I tried adding the code does not work. can anyone help me? thanks
- The topic ‘[Plugin: WP-Paginate] Comments to be paginated not working’ is closed to new replies.