Allow anonymous comments, but prevent spam [closed]

Okay, I’ve (probably) done just enough reading since asking this question, and apparently this combo of anti-spam plugins, works to a very appreciable extent in mitigating spam: Akismet + Cookies for Comments + Impostercide Knowledgeable people agree: Alex aka Viper007Bond uses Akismet and Cookies for Comments on his own blog, alongside having Trackbacks disabled. (Source) … Read more

Threaded comments – deleting parent comment leads to orphan comments

Had this problem on a site where commenter’s would post comments to the wrong posts and comment threads, had to move thousands of comments from one post to more appropriate posts on the site. I used this plugin http://wordpress.org/extend/plugins/move-wordpress-comments/ for fixing threading. With the plugin you have the option of turning the child comments into … Read more

Get total number of comments from posts in a specific custom taxonomy

You’ll need to loop through your posts, use get_comments_number() to get the number of comments for each post, and then accumulate the total number of comments in a separate variable. e.g.: <?php $features_comment_count = 0; if ( have_posts() ) : while ( have_posts() ) : the_post(); $features_comment_count += get_comments_number(); endwhile; endif; ?> (I’ll assume that … Read more

How can I see all of a post’s comments on a single page as a reader, if pagination is enabled?

Just build a link that has some query args: printf( ‘<a href=”http://example.com/all-comments?pid=%s”>All comments</a>’ ,get_the_ID() ); Then add a page with a a permalink of all-comments, so you have something to target. There you attach a template like the following (just a base to work off): <?php /** * Template Name: All Comments */ // Abort … Read more

get recent comments of a particular category

In this link, there is the following code that addresses your question: // Posts per page setting $ppp = get_option(‘posts_per_page’); // either use the WordPress global Posts per page setting or set a custom one like $ppp = 10; $custom_offset = 0; // If you are dealing with your custom pagination, then you can calculate … Read more

“Categories” for comments?

Comments are kind of “limited” in WordPress. You have three different types for them as get_comment_type() shows nicely and you can not extend that list. So, adding meta values to your comments is the easiest, and probably “most standard” way, to be able to distinguish different “types” of comments. Handling the comment in- and output … Read more

Post comment as different user than logged in

Yes, add an user-select field in the comment form: add_action(‘comment_form_after_fields’, function(){ // allow only users who can moderate comments to do this if(!current_user_can(‘moderate_comments’)) return; $user = wp_get_current_user(); wp_dropdown_users(array( ‘name’ => ‘alt_comment_user’, ‘selected’ => $user->ID, )); }); When the form gets processed, check if an user has been selected and change the comment data before it … Read more

Deep customization of the comment form?

This is hard. Output buffering could solve that: add_action( ‘comment_form_field_comment’, ‘ob_start’ ); add_action( ‘comment_form’, ‘wpse_83898_replace_submit’ ); function wpse_83898_replace_submit() { $html = ob_get_clean(); # do some magic echo $html; } Just an idea, not tested.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)