Comments allow your website's visitors to have a discussion with you and each other. When you activate comments on a Page or post, WordPress inserts several text boxes after your content where users can submit their comments.

learn more… | top users | synonyms (1)

1
vote
1answer
51 views

Comment form not showing up without comments

My posts dont show the comment form unless that post already has comments. If post has one or more comments, everything works perfectly. Everything used to work fine (that's why some posts have ...
1
vote
2answers
42 views

Declaring <?php ?> in variables [closed]

I need to put the PHP <?php global $' . $icon_var . '; echo $' . $icon_var . '; ?> inside the variable of a custom menu structure, but it gets commented: <a ...
1
vote
0answers
44 views

comments_array filter doesn't work in some themes

I have a problem with comments_array. The filter doesn't work in some themes. add_filter( 'comments_array', array( $this, 'display_comment_image' ) ); // in __construct. function ...
6
votes
1answer
57 views

Show only posts which can be commented OR have custom meta field

I'd like to exclude posts on the homepage which are closed for comments. This works thanks to this: Show only posts which can be commented Now I'd like to add the possibility for exceptions – to show ...
1
vote
1answer
47 views

css hide all the comment reply links except the lowest nested comments

I understand different themes use different css for the reply link however there should be enough native WP css to narrow it down to the lowest nested comment. I'm trying to get my head around the ...
5
votes
1answer
101 views

How to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit?

Is there a way to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit? I don't necessarily need nested comments I just need the reply link to be always ...
1
vote
1answer
35 views

Count comment threads, not total comments in a post

For a post I'd like to count the comment threads and not include nested replys in the count. Currently I'm using a simple comment count, comments_number( $zero, $one, $more ); What would be the best ...
1
vote
2answers
48 views

Commenting out unwated CSS/scripts in HTML with PHP

I am trying to comment out unwanted CSS and JS files to prevent them from firing in the HTML by creating a simple function in my functions.php. So far I have: function commentStuff() { $stylesheet = ...
1
vote
1answer
52 views

Redirect when click on “response” in comment section

I use a custom template for some of my categories. These categories offer a comment section in which a user can reply to an comment. The problem is, that the use (after clicking on the reply link) is ...
1
vote
2answers
260 views

How to make comment text field un-required?

My requirements are bit different I was able to hide email and website field with filter but what I want to know is there a way to make comment text un-required when I am giving comment without ...
0
votes
2answers
138 views

How to allow duplicate comments AND without comment text

I've searched hard but I've been nowhere near close to finding the answer to this... I have a comment meta box that gives the commentor two tick boxes. The tick box is the only input into their ...
1
vote
1answer
26 views

How can the recipients and content for comment email notifications on a custom post type be changed?

I am building a ticket system and would like to use the comment threads as the discussion for the ticket. There are three users involved in each ticket: The client. The support operator. The support ...
1
vote
1answer
148 views

WP 4.4.1 allow empty comments via add_action 'pre_comment_on_post'

got a question about allowing empty comments with worpdress v.4.4.1 to achieve this i use the action 'pre_comment_on_post'. in WP 4.3.1 i could do this easily: if (isset($_POST['comment']) ...
0
votes
1answer
57 views

Comments and post dates not showing up correctly on “posts page”

I have customized the Twenty Fourteen theme to use the page "news" for my posts page because I have static frontpage. When you view my news page, comments don't show up, even though they are enabled, ...
0
votes
0answers
13 views

How can i replace WordPress comment email with mine

I want to replace the whole comment moderation email with mine. With this question I understand to change the content of comment email. How can I send html email instead of the default one?. If any ...
0
votes
0answers
101 views

Get url/link to latest comments in a post

I have a post list in WordPress where people can see the most recently commented posts. They will appear above the list. That's fine, but now, I have 300 comments on the same posts and I don't want ...
2
votes
1answer
53 views

How to Add a Random Custom Gravatar in the WordPress Comments?

I have a client that has 5 different gravatar images, and would like them to be randomly used as the thumbnail for people's comments that have no Gravatar. I know how to change the Gravatar to a ...
0
votes
0answers
12 views

Reviews on Custom Post Type

I have a custom post type Book and I am trying to get reviews going on there. I've followed this tutorial, however it is for all of the comments and it does not fit exactly what I am trying to ...
2
votes
1answer
35 views

Show only posts which can be commented

I have a pre_get_posts filter to show exclude some posts on the homepage. But I can't exclude the posts which are closed for commenting. How do I do this? What I have is: function ...
0
votes
1answer
37 views

Minimum allowed comment length only on a specific page

This is the function I use to only allow comments longer than 60 chars: add_filter( 'preprocess_comment', 'wpb_preprocess_comment' ); function wpb_preprocess_comment($comment) { if ( strlen( ...
0
votes
0answers
81 views

Adding Recaptcha to comment form Wordpress

I tried to add google Recaptcha to my comment form (website platform = wordpress) and I don't get it work. I followed this tutorial which explain step-by-step how to do it... I followed all the steps ...
5
votes
7answers
17k views

How to add a class to the comment submit button?

How do I add a class to the comment submit button? The simplified function comment_form(array('id_submit'=>'buttonPro')); obviously only changes the id and class_submit does not seem to exist. I ...
0
votes
1answer
32 views

Dynamic page with comments

I am aware that it is possible to write a page template with custom PHP code to generate dynamic content. For example, the page can take in a query parameter e.g. musician ID. It then uses custom ...
0
votes
1answer
28 views

Admin - Dashboard - Unset recent comments

I try to get rid of the comments list in the WordPress 4 dashboard section but it doesn't work. Here is what I tried: function remove_all_dashboard_widgets() { global ...
1
vote
1answer
42 views

preprocess_comment array doesn't have comment_ID

I have a function using the filter preprocess_comment and want to use the update_comment_meta( $comment['comment_ID'], 'post_id', $post_id );. However, the array in preprocess_comment doesn't have ...
0
votes
0answers
21 views

Change comment order

Is there any way to show the latest comments first? It begins with the oldest comments and I think that can be very annoying after some time!
2
votes
1answer
22 views

Moving comments section to left of content (Twenty Thirteen)

So I want to move my comments section to the left of my content in my Twentythirteen child theme. I've located where it's pulled from in the content.php file: <?php if ( comments_open() ...
0
votes
2answers
74 views

Custom comment field not showing when logged-in

I've added a custom field in comment by using function comment_label($fields){ unset( $fields['url'] ); $fields['rate'] = '<p class="comment_form_rate" id="rate_recipe"> ...
1
vote
1answer
26 views

List user comments in author page

I'm trying to display a list of the author comments in the authors page but it only shows No comments made. How can I list user comments in the authors page? <?php $args = array( 'user_id' ...
-1
votes
1answer
39 views

Get Comment With Meta value

I need get all comments of a post including of the meta value.. for eg. i need all comments fields + a meta value. i tried the following code to get but.. its not working $args = array( 'status' ...
0
votes
2answers
649 views

How to edit the text below “Leave a Reply”

I use the Twenty Ten theme, customized. The theme text is: Your email address will not be published. With the email box below, this gives readers the impression that they must enter an email ...
0
votes
0answers
24 views

Redirect after comment does not work with REQUEST_URI

I have a page with loop of posts. Every post can be commented from that page and i'm trying to redirect after commenting back to that post with hastag in url. Only problem is that $page_path does not ...
0
votes
1answer
44 views

How to replace default comments with custom HTML?

I'm going to replace default list of comments and comment form with Facebook's comment box. As far as I know there is function wp_list_comments(). How can I replace this function with my custom one? ...
0
votes
0answers
15 views

I wish to hide the complete comment section/div on all the posts page after a particular time period

I wish to hide the complete comment section/div on all the posts page after a particular time period(i.e after like 5 minutes after landing on the post page). Tried different plugins but none of them ...
3
votes
1answer
1k views

Disabling Comment Notifications for Post Author

I am trying to disable comment notifications for post authors (or anyone else besides the site's admin) for a client's site. I've attempted to create a plugin that uses the pluggable function ...
0
votes
1answer
33 views

Allowing comments on author pages

I need to be able to allow users to leave comments on author profile pages. I came across another answer here that has given me a basic outline of what needs to be done to allow it: Author page: ...
-1
votes
1answer
21 views

Trouble figuring out how to get my button to submit comment

I have a text area in the sidebar (sidebar-chat.php) of my posts page with an input that is an image. When this image is clicked, the comment is supposed to submit. I am just having trouble figuring ...
0
votes
0answers
64 views

On WP 4.4, how to get the post id on comment_post hook

Since WP 4.4, seems like is not possible anymore to use get_the_ID() or the_ID() when hooking on comment_post action. How can I get the post_id when a new comment is saved?
0
votes
0answers
53 views

get_comments not working properly after WordPress v4.4 update

I just found a wired thing on my website after v4.4 update. In my blog pages I use 2 functions to fetch comments. First I use wp_list_comments( array( "callback" => "checkout_comment", "type" ...
0
votes
1answer
11 views

Comments closed but enabled on edit screen

I have been trying different themes, and I just noticed "Comments closed" on every post. I know that it wasn't always that way, but I went back to the previous theme and then back to one from further ...
1
vote
1answer
17 views

Notify Wordpress Site I Have Linked To Them

I have noticed that when a Wordpress site puts a link to my site in a post it shows their website in the comments section of my site. I'm wonder how could I make my PHP application do this? I mean ...
1
vote
1answer
84 views

Passing arguments to wp_list_comments callback function

One can customize single comment markup using the callback argument in wp_list_comments like this: $args = array( 'callback' => 'my_callback', 'avatar_size' => 48, 'type' => 'comment' ); ...
0
votes
1answer
31 views

How to change comment texts that has a specific comment_ID - Hook into comment

Say, I want to change the comment text where comment_ID = 10 or 19. I don't want them to be updated in the database. Just in the frontend, it'll show a custom text instead of original comment content. ...
1
vote
1answer
76 views

How can I retrieve comments from last 5 minutes for a post?

I need to find comments posted in last 5 minutes. I am using the following query. What should be the value of before? <?php $postID = get_the_ID(); wp_list_comments(array( ...
1
vote
1answer
40 views

How to limit comment author to one comment per post

Is there a way to limit comments to one per post based on the comment author email ? It should work for none logged in users.
0
votes
0answers
93 views

Let user delete comment on front end only

I have a edit comments page on my sites front end and have placed a delete comment link for users. The link works however it takes the user to the backend to confirm the comment deletion. I cant have ...
1
vote
1answer
130 views

Multiple Comment Forms in a single page [closed]

I would like to make a "Comment" section on every of my page on my wordpress website. So if you head to http://www.lolcounter.com/champions/lee-sin, You can see on top of the page the "General ...
0
votes
0answers
19 views

Admin panel: Show Comment Count column also for drafts (not only for published post)

I have a Custom Post Type. In admin panel, for published posts I see the column "number of comment", but for draft post I don't see this column or the option to enable it. How to enable the Comment ...
0
votes
1answer
73 views

How can I edit comment notification email content?

I have to edit the mail content which is default one to send notification to the post author when a comment is submitted. I need to add my custom content by replacing the existing comment mail ...
0
votes
0answers
43 views

Create Custom Comment Type

I have a page when I want multiple comment_template, so I want each of my comment_template to have different type so I see different comments in those 2. My get_comments look like this $args = ...