How to load and show comments with AJAX instead of pagination?
It looks like Lester Chan has created a plugin that creates pagination for comments. Take a look at WP-CommentNavi 1.10 Lester Chan has created many good plugins.
It looks like Lester Chan has created a plugin that creates pagination for comments. Take a look at WP-CommentNavi 1.10 Lester Chan has created many good plugins.
This have several components to it – what option itself holds and how value from it is stashed away and reused by various pieces of core code. I am not sure this is perfect, but my quick take would be: new Adjust_Comments_Per_Page( 10, ‘years’, ‘category’ ); class Adjust_Comments_Per_Page { private $amount; private $term; private $taxonomy; … Read more
I’ve often thought this would make a good feature, though I’ve never seen a plugin for it. I think the term “comment” is probably throwing off your search. I wouldn’t think that this would be stored as a comment internally, but rather as metadata for the post. I did a search for plugins using the … Read more
I don’t know why somebody downvoted this question. This is a GREAT question. Yeah, that’s totally possible. What you would want to do is use comment_meta to store the titles. You could add the new field into the form using the ‘comment_form_top’ action. It runs before name, email, and url, and still runs if the … Read more
MyISAM locks the whole page for writes and is not ACID compliant, while InnoDB sticks to locking rows as you point out, and is ACID compliant. This makes it sturdier when you’ve a lot of writes, as in faster and less prone to data corruption. It’s slower for reads in my experience, though it handles … Read more
Most likely, the main thing that you missed is that you must have “Break comments into pages” checked in the Settings Discussion Subpanel. The pagination functions require this to be set, as do the URL rewrites. Here’s a working, complete page template to do what you’re asking: <?php /* Template Name: All Comments See http://wordpress.stackexchange.com/questions/63770/aggregate-comments-with-pagination … Read more
You are missing a “NOT” logical operator (!) in your if statement. You want to say “if comment author IS NOT empty”. As of now, the function is reading that the author is not empty and defaulting to your else statement that tells it to output the author’s full name. Use the second block of … Read more
Well, it is the same form, but it is moved to another place in the DOM tree. So you could create one style for just .comments #respond, and one for .comments .comment #respond for the moved reply form.
You can use the function paginate_links() for any pagination. For your specific case: $total = $wpdb->get_var(” SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE user_id = $thisauthor->ID AND comment_post_id = ID AND comment_approved = 1 “); $comments_per_page = 100; $page = isset( $_GET[‘cpage’] ) ? abs( (int) $_GET[‘cpage’] ) : 1; echo paginate_links( array( ‘base’ => add_query_arg( ‘cpage’, … Read more
Not quite; the redirect occurs inline inside wp-comments-post.php Use the filter comment_post_redirect to pass back any URL of your choice. Arguments passed are the default redirect & comment object, respectively. Based on your comments, here’s a suggestion: function wpse_58613_comment_redirect( $location ) { if ( isset( $_POST[‘my_redirect_to’] ) ) // Don’t use “redirect_to”, internal WP var … Read more