Articles of comments

customizing TwentyEleven comments template

Typically I don’t utilize comments on my sites, however I’m using the comments functionality as a sort of live-feed testimonials page. To do this, I’ve borrowed comments.php and the comments portion of functions.php from the TwentyEleven theme. What I’m currently struggling with is how the comments/form are displaying on the site Ideally, I’d like the […]

how to properly use comments-template.php

I want to modify comments form for both logged in users, and for those who are not. I modified the form for those who are not logged in by changing my comments.php but I’m not quite sure how to modify my form for logged in users. I know I have to use comments_template(), but when […]

Jetpack Comments with fall-back

I’m developing a theme based off of bones – I went ahead and edited the comments.php file – the comments form is hardcoded – I assumed this was the right way to do things so I carried on and structured/styled the comments form to fit in with the theme I am building. Today I installed […]

Make WordPress process admin group comments using $allowedtags

WP uses $allowedtags to limit the set of allowable tags for comments.However, comments from administrators are unfiltered. What’s the easiest way to ensure admin comments are also constrained to the tags contained in $allowedtags?

count number of user comments with a specific comment meta value

I am using the code below to count the number of comments by a certain user: global $wpdb; $count = $wpdb->get_var( ‘SELECT COUNT( comment_id ) FROM ‘. $wpdb->comments .’ WHERE user_id = ‘.$user->ID.’ AND comment_approved = “1” AND comment_type NOT IN (“pingback”, “trackback” )’ ); I am in addition, using a comment meta field (‘consider’) […]

Filter In Reply comments from WordPress Admin Panel

Is there any way to filter the comments that are In Reply from the comments list? I basically just want to see the depth 1 comments on a separate filter. @GhostToast Ive added this to create a new filter ‘Ask’ on the Admin Comments Panel. is there a way to just apply your top level […]

How to add enctype to multipart/form-data to comment form?

I need a way to change the encoding type for my comment form, without hacking the core files. I’m aware of the function to work on the post editing form: post_edit_form_tag. I’ve tried this: jQuery(‘#comment_form’).attr(“enctype”,”multipart/form-data”); But it doesn’t work, the only next step I know of is to hack the source code… Any help would […]

Comment Moderation and CDN Caching

I work on a site that is entirely cached by a CDN. We are about to roll out comments and will be moderating every comment before it goes live. When someone posts a comment and the page is rendered with a message indicating their comment is being held in moderation. What I don’t want is […]

Check the Comment in Reply or Normal State

I’m currently working with custom comment meta, and I have some custom additional field such as rating etc, when user write a comment ( not comment reply ) I want to show the rating field, but when it’s on reply comment state I want to remove this field. Is there a build in conditional function […]

Delete all one-word comments

I’m trying to delete all wordpress comments with only one word. I found this mysql query to delete all comments at once, but that’s not what I want to achieve: DELETE FROM wp_comments WHERE comment_approved = ‘0’