Customizing Comments on Posts

Set per_page to 5 and page to 1 in wp_list_comments http://codex.wordpress.org/Function_Reference/wp_list_comments Then add your read more link just below your comments to reload the page with per_page and page not set. You can do this with AJAX for smoothness.

How to use the ‘comments_number’ filter?

The filter you mention is used by the end of get_comments_number_text. As you can see from the source the number of comments is passed through the filter, allowing you to completely change the default text. Like this: add_filter (‘comments_number’, ‘wpse89257_comments_number’, 10, 2); function wpse89257_comments_number ($output, $number) { if ($number == 0) $output=”0 Comments”; elseif ($number … Read more

Display Custom comments field number

I would try something like this: $comments = get_comments(); $yes = 0; $no = 0; foreach ($comments as $comment) { $vote = get_comment_meta ( $comment->comment_ID, ‘vote’, true ); if ($vote == ‘yes’) { $yes++; } else if ($vote == ‘no’) { $no++; } } echo ‘Yes:’.$yes.’ No:’.$no; Problem is the numbers can easily be manipulated … Read more

How to assign classes to all elements?

Jquery solution: **assuming your posts are in a division with the class of “post”. <script type=”text/javascript”> $(document).ready(function(){ $(“.post p”).each(function(){ $(this).addClass(‘paragraph’); }); $(“.post ul”).each(function(){ $(this).addClass(‘list’); }); //add more lines here to select more elements }); </script> Paste this in your footer. *you need jquery installed. And better yet would be to enque this using http://codex.wordpress.org/Function_Reference/wp_enqueue_script