This Plugin provides Ajax enabled comments system with paging,posting and form validation to your WordPress blog.
- Ajax page navigation
- SEO friendly
Pagination can cause a duplicate content issue with search engines.YAAPC can automatically generate “noindex,follow” meta tag in your paged comments page to avoid duplicate content in search engines that may hurt your rankings.(many thanks for Hank’s great comment and advice)
- Ajax comment posting
Posting comments via Ajax,without page refreshing.
- Comment form validation
validate the user input in comment form before sending to server.
Demo and Testing
please don’t comment to this post for testing purposes.
- Upload YAAPC to the `/wp-content/plugins/` directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- (Optional,but recommended) Modify your comments template(comments.php),add a div with id="yaapc-comments" to wrap the comment list area. Place <?php yaapc_pages()?> in where you want the page selector to show.take a look at the example bellow for details.
- Modify the style.css in YAAPC directory to custimize how YAAPC looks .
An example of a modified comments.php:
... ... <!-- You can start editing here. --> <div id="yaapc-comments"> <?php if ($comments) : ?> <h3 id="comments"><?php the_title();</h3> <?php yaapc_pages()?> <ol class="commentlist"> <?php foreach ($comments as $comment) : ?> ... ... <?php endforeach; /* end for each comment */ ?> </ol> <?php yaapc_pages()?> <?php else : // this is displayed if there are no comments so far ?> <?php if ('open' == $post->comment_status) : ?> <!-- If comments are open, but there are no comments. --> <?php else : // comments are closed ?> <!-- If comments are closed. --> <p class="nocomments">Comments are closed.</p> <?php endif; ?> <?php endif; ?> </div> ... ...
click for full image:
- How to display the comment number?
Add <?php echo $comment->yaapc_number;?> to your comment template(inside loop).