Questions tagged [comments]

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Add custom field on admin dashboard comments / reviews

I hope someone can shine me some light with regards to the problem I'm solving. Currently we can add comments / reviews on woocommerce products - via dashboard using this form: I can add a default ...
0
votes
0answers
6 views

Enable comments pagination only amp page

I'm using automattic's amp plugin and would like to know if is there any way to enable pagination in comments only on amp pages. Scenario: In our business we don’t want the pagination of comments on ...
0
votes
1answer
14 views

Why does a <button> on Comment edit page submit the page?

I followed this guide to add a "copy to clipboard" button on the edit Comment page (comment.php?action=editcomment) It works but it also submits the page (i.e. the page reloads back to the ...
0
votes
0answers
12 views

Show all people who commented on all posts by an author

I need to make a feed, showing everyone, or at least the last ones who commented on an author's posts. I've tried it in different ways and I haven't been able to. Can you do it? example: Juliana ...
0
votes
1answer
29 views

How to sort comments in the "edit-comments.php" table based on a comment meta field?

Goal Sort comments in the "edit-comments.php" table based on a comment meta field after clicking on the title of a custom made column. Context For the sake of brevity let's assume that when ...
0
votes
0answers
16 views

What is the hook for admin ajax post comment

Other hooks like wp_insert_comment , comment_post , comment_post_redirect , all of them works when comment is posted from comment form. however , I did not find any hook which will trigger when the ...
0
votes
0answers
13 views

How do I make the comment disappear after deleting from the database?

I can delete the comment from the database with this code, however when the page is loaded again the comment will still be there. I need to update again to disappear. How do I resolve this? ...
1
vote
2answers
78 views

How to refresh the page when an admin trashes a comment from Comments in the admin site?

Goal Every time an admin clicks on the "Trash" button below a comment, refresh the page. If the comment was trashed while the admin was in the "All" category, he should be in the &...
0
votes
0answers
14 views

pin a comment to top of comments list

i want to pin all comments from post with commentmeta = 'spolie' on the top of my comment list in post. Quite similar to Instagram pin comment or wpdiscuz pin comment; Can someone help me. tnx :)
1
vote
1answer
34 views

How to automatically evaluate comment content without user seeing the delay?

I'm developing a comment plugin that sends the comment's content to a third party API and based on the response it either approves, trashes the comment or leaves it as pending. The problem is that the ...
0
votes
0answers
13 views

Question about error display in wordpress

Is it possible to display the basic errors on the page rather than with wp_die? For example, display the "please enter a comment" error above the form rather than landing on the wp_die ...
2
votes
0answers
34 views

Display complete comment section via post ID

what I want to achieve: I would like to display the complete comments (including answers and the comment form) of a certain Page ID in the middle of my home page (I use WPBakery Page Builder). These ...
0
votes
1answer
26 views

Moving post's content to post's comments section

I've resurrected a Blogger blog from the Wayback Machine. The business that did the migration had all of the blog's comments in each post included in the post itself. I would like to keep the years-...
0
votes
0answers
22 views

REST API : Get post title with comment

I'm having trouble registering a rest field with the post title when doing a "GET /wp/v2/comments". I'd like to be able to have field "title" with the raw (or rendered?) real post ...
0
votes
0answers
41 views

prevent get_comments() from returning comments not in comment__in

The query string comment__in takes an array of comment IDs to include. I have an array of comment IDs that I would like to assign to comment__in, such as $args['comment__in'] = $comment_IDs;. Some ...
0
votes
0answers
8 views

Enable comments for custom template page

We use careerfy theme WordPress which is a system for a job board. I would like to enable comments for each job post page, these pages are not listed on the WordPress admin panel, I can access it via ...
0
votes
0answers
23 views

Enable comments on custom page

We use Careerfy theme which is a system for a job board. I would like to enable comments on each user page, I mean each user has a profile page, these pages are not showing on WordPress admin (Not ...
0
votes
1answer
23 views

RSS feed URL for post comment shows HTML source code of page

I am facing a weird issue on my site. When I type RSS feed links, global feed and comments work correctly. But, when I go on a specific post, and enter (mysiteurl.com/postname/feed), It just gives me ...
0
votes
1answer
18 views

Use of comment_reply_link_args filter

i am trying to create a filter like this add_filter('comment_reply_link_args','change_author_title'); function change_author_title( $args ) { $defaults = array( 'add_below' => '...
0
votes
1answer
45 views

How to remove a span class?

I would like to totally remove all the hyperlinks that my comments on wordpress are making. I've almost removed all the hyperlinks, but there is one left. It is this one : <span class="time&...
0
votes
0answers
43 views

comments.php remove date/time's #hyperlink

I can't find a solution to remove the hyperlink from the comments. There is always this hyperlink #comment in every comments I have. I've tried a lot of things, but the only thing I'm able to do is to ...
0
votes
1answer
18 views

How can I filter the comment action links so that I can display the actions links based on user capabilities?

I am referring to the action links above. Is there a filter or hook I can use to display these links based on user roles and caps?
0
votes
1answer
24 views

Which hook do I use to edit pending comment count on wordpress dashboard?

The picture gives an illustration of the pending comments I am referring to. As you can see, the number shown on the menu bar is different from the number shown on the pending column. I am trying to ...
0
votes
1answer
47 views

I need help using pre_get_comments to limit comments in the comments admin screen

I am trying to limit the comments in the comments admin screen to: Display all comments for the current user Display all the comments made on the current user's post if(!current_user_can('...
0
votes
0answers
16 views

Updating Single Data in wp_commentmeta Table

I added like/dislike buttons on the comments section of the blog posts on the site and aimed for them to update the meta_value according to the meta_key under wp_commentmeta. However, when any of ...
0
votes
2answers
37 views

Get all commenters on a post

I know there are several similar questions, but I couldn't find the one I wanted. I want to get all commenters's on a post. But if there is a commenter who gives more than one comment, then he is not ...
0
votes
0answers
40 views

Count comments made by certain user's role (count intersect array in php)

I've written code to display a table with columns containing: post date post title number of comments of users with certain groups (actually certain meta data). The following code only works ...
0
votes
0answers
70 views

Delete #comment-XXX link

I would like to know if there is a way to add some code in my functions.php that could delete the #comment-583 link. For example, everytime I click on the date and time of a comment, there is a like ...
0
votes
0answers
13 views

What is the best way to grouping comments in wordpress?

In WordPress, I want to group comments by a numeric value to use each of the groups in a special parts that I want. Any of my groups have a numeric value as identifier. For example, I want to put ...
0
votes
0answers
27 views

comment just attachment .. reply just text ... can I do that?

I want comments just to upload videos without text but replies the opposite I mean comments just to upload videos.. without text area ... in replies its a must to write in text area without any ...
0
votes
0answers
18 views

Comments pagination: reverse JUST the links texts (1-2-3 to 3-2-1), not comments order

Hi fellow Code Poets ) I wanted the pagination links numbers to be in the order opposite to the pages they lead to. The link leading to the last page had to read 1, and vice versa, etc. I've written ...
0
votes
0answers
19 views

Adding a new field to already posted comments

I want to add a checkbox (verify) to each comment so that the author of the post can verify each comment. The checkbox needs to be read-only to anyone but the author of the post. I've found different ...
0
votes
0answers
15 views

Wordpress (php) comments pagination

Is there a way to show in the first page (of comments) the last received comments and in the second page the olders? I used the settings -> discussion -> selected options. With it i can select ...
0
votes
0answers
25 views

Remove hash link on comment date on wp_list_comments

I tried to find a solution but I don't found nothing. I'd like to remove the hash link that wp_list_comments automatically generates. In particular, if an author post a comment, my wordpress generates ...
0
votes
0answers
21 views

New comment not showing up (only for logged out users)

The problem is: Native wordpress new comment not showing up on any post (only for logged out users). Discussion settings that are checked (The rest are unchecked): Attempt to notify any blogs linked ...
0
votes
0answers
13 views

Comments: How to add "Reply to [Original Commenter's Name]" with link

I'm using the standard WordPress comments, with the Subscribe to Comments Reloaded plugin. The top of my comments currently look like this: [Avatar] Commenter's Name I'd like to add some hook to my ...
0
votes
1answer
24 views

How to change the comments form title based on post type

I know how to change the title of the comment form by using comment_form_defaults, but I don't know how to make it different for a custom post type from a regular post. Also I would like to have the ...
0
votes
1answer
36 views

Is there a way to link to the BOTTOM of the comments on a wordpress page?

We're using a free account on wordpress.com. On our site's main page, we have this HTML: To contact us <a href="#comments">send us a message in a comment</a>. Clicking on this ...
0
votes
1answer
24 views

Automatically register users with comments

I would like to know if it is possible to automatically register a user who writes a comment so I can send them a coupon as a registration reward, I try few plugins but didn't get any result! Or maybe ...
0
votes
0answers
22 views

Comments only displaying when logged in

I am using the theme colibri for my site/blog and I have set it so the comments will display at all times, logged in or not: The site is: https://www.miniatureartacademy.com/2021/04/20/minotauro-pt4/ ...
2
votes
1answer
57 views

Sanitizing comments or escaping comment_text()

I'm creating a template for comments on my WordPress site. I noticed that a simple <script>alert(1);</script> slips through the default WP codex implementation of comments, using the ...
0
votes
0answers
14 views

display comment type count of post single page

I have comment type. when author marks any standart comment. standart comment convert to sticky comment type. but how can I display sticky comment type. This stikcy comment is used as accepted answer ...
0
votes
0answers
19 views

Is it possible to give a classname to specific comments in the Wordpress admin?

Is this possible? I'd like to go into wp-admin, click on a comment and give a class for a specific comment. Would it be possible to do so? If so, could you please help?
1
vote
1answer
22 views

Loading comments in ajax - comment-reply function missing $args

I'm loading comments with AJAX. It all works fine except reply link isn’t being rendered on the page. As I understand, the problem is can’t pass $args. How would I access $args or max_depth outside ...
0
votes
1answer
34 views

Help with comments.php

I have a page with a shortcode that displays information from the database. I have set it up to allow comments on the page. The problem I am having is when I click Submit Comment, I get the following ...
0
votes
1answer
21 views

How to add commentary types or category for a post

I need to create three types of comments por a post. The idea is to not mix up all the comments and let the users comments for a particular subject of the post. So define comments type A, type B and ...
0
votes
0answers
19 views

Wordpress Comment Order By Number Of Replies

I would like to display comments based on the replies (comment children) $comments = get_comments(array( 'orderby'=>'comment_count_'.$post->ID, 'order'=>'DESC', 'post_id' => $...
0
votes
0answers
48 views

add blacklist moderation list inside pre_comment_approved filter plugin

i am using Comment Whitelist plugin to create a whitelist of email domains for autoapporing comments. It seems that the plugin overrides wordpress : Settings->Discussion options->moderation ...
0
votes
1answer
40 views

Custom sort comments with select form

I use ACF Pro to create a customized comments section with additional fields to my custom post type called Products (it's a simple page with a custom comment section, NOT using WooCommerce). Now ...
0
votes
0answers
5 views

How can I prevent users from commenting on a post after that post gets a specific number of comments?

I'm trying to figure out a problem I have. I need to prevent my users from commenting on a post after that post received 15 numbers of comments. In a way I want to set the maximum number of comments a ...

1
2 3 4 5
37