How to change style of Disqus comment count on main page

The comment count in your theme is wrapped in <span class=”comments-link”>…</span>, so you can set a CSS rule in your CSS file like: .comments-link { //here your rules } For future questions, please, note that questions about pure CSS, not specific to WordPress, can be more suitable for other sites, may stackoverflow.

edit comments capability for authors

The role needs “edit_post” capability to edit comments (the reason beeing that comments are posts for wordpress) –> do your authors have “edit_post” capability? this enables the role to edit posts also, which might not be desired. WordPress capabilites are weird. There exists a meta capability ‘edit_comment’, but its not very intuitive. As far as … Read more

Get comment content by comment ID

The Codex makes it seem like you can query for a specific comment by ID, as does the GenerateWP query generator, but I couldn’t get it to work with either of those examples. Even looking through the WP_Comment_Query:query() code makes it clear that you should be able to pass the ID in the parameters. That … Read more

Send Notifications to All Admins

Is there a nice little filter that someone knows about where I can hook into notifications and send the notification to each / every administrator? There is : comment_post Runs just after a comment is saved in the database. Action function arguments: comment ID, approval status (“spam”, or 0/1 for disapproved/approved). http://codex.wordpress.org/Plugin_API/Action_Reference#Comment.2C_Ping.2C_and_Trackback_Actions And user_register which… … Read more

How to get replies of a comment?

As comment_ID is a unique value, there is no need to include the post_id in the arguments. This works fine for me: $args = array( ‘status’ => ‘approve’, ‘number’ => ‘5’, ‘parent’ => 3194 ); $comments = get_comments($args); This will return 5 approved comments whose parent is the comment with the comment_ID 3194. Sample output … Read more

Create a “Reject” action for comments?

It’s currently not that easy to create new comment statuses in WordPress. Comments in WordPress have a field comment_approved which can have a value of 1, 0, spam or trash. In your case I’d probably leverage the existing trash functionality and store the rejection reason as comment meta. That’s similar to how anti-spam plugins like … Read more

How would I count the number of times a comment meta field’s value is in a post’s entire comments?

You should be able to do a meta_query in a WP_Comment_Query(): $args = array( ‘post_id’ => ‘post-id-here’, ‘meta_query’ => array( array( ‘key’ => ‘fish’, ‘value’ => ‘shark’, ‘compare’ => ‘LIKE’ ) ) ); // Query the comments $comment_query = new WP_Comment_Query( $args ); // Count the number of comments $count = count ( $comment_query ); … Read more

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