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
1answer
34 views

Re-Direct After Comment Submit IF Comment Comes from Sign-Up Page

After having successfully done a custom version of the WordPress comments form into a "sign up" page, I now need to re-direct the user to a custom page upon submitting the "form". ...
0
votes
1answer
22 views

How to block comments and pings?

Some scum are trying to post spam comments about viagra/casinos to my site. I have comments disabled at Settings > Discussion Somehow they manage to send comments and pings to my site. I want to ...
0
votes
1answer
18 views

Changing the Comment Fields using Filter (without success)

Am I doing this all wrong or should this be working? No matter what post I visit, it's thrown into an endless loop.. This is the code: add_filter('comment_form_fields', 'comment_form_args'); function ...
0
votes
0answers
69 views

How to show comments from different Plugins to same post type?

I have two different plugins but both are related to each other. The first plugin displays comments in this way. <?php if (isset($_POST['submit_tickets'])){ $tickets_reply = $_POST['...
1
vote
1answer
16 views

Trying to implement Ajax comments in WordPress, getting WP error

I'm trying to implement Ajax for my comments in WordPress, using this tutorial. But I'm running into issues when integrating the code from the tutorial into my own pre-built theme. The issue is that I ...
0
votes
0answers
17 views

Is there a way to only allow certain user ranks to comment on a post

I have a suggestion page on my WordPress site and I would like for a moderator to create comments giving updates on the progress. However, I only want that rank to be able to comment. Is this possible?...
0
votes
1answer
22 views

How to check if `comment_meta` exists before inserting the comment?

I am inserting comments via wp_insert_comment and while doing so I am adding email replies only. Now, I want to check if the comment is already present or not before inserting and if does exist do not ...
0
votes
2answers
44 views

How to get the `comment_post_ID`?

I have extracted the reply emails. The original emails are saved as CPT and work as Tickets in my plugin. I want the reply email to go as a comment to the original email. for($j = 1; $j <= $total; ...
1
vote
1answer
13 views

wp_comments table really big casuing /wp-admin/edit-comments.php to slowly load

Our wp_comments has millions of rows. When we load /wp/wp-admin/edit-comments.php it would timeout. Looking at mysql, this simple query is taking a long time SELECT wp_comments.comment_ID FROM ...
0
votes
0answers
7 views

Show content if user left comment / non-logged visitors?

im trying to hide content/show content based on comments. i tried this to achieve what i want. but i want to hide/show content from non-logged visitors also.. this is my final code: // the user may ...
0
votes
1answer
17 views

Name of comment field differs on different sites

I have a question regarding the „name“ of the comment field of wordpress blogs. I have 2 sites, that are just available locally on my LAN. On the first site, if I inspect the comment field in firefox, ...
0
votes
1answer
31 views

Who approved a comment, to show up in dashboard

About 10 years ago (!) this message was posted Find out which moderator approved comment? That perfectly works but I would like the "Approved by [---]" to show up in the "comments" ...
0
votes
0answers
34 views

SQL command to delete "pending comments" doesn't work...?

This is the SQL command: DELETE FROM wp_comments WHERE comment_approved = 0 This, as you can see in the screenshot below, says that the operation was executed ok but no rows affected....which is odd ...
0
votes
0answers
20 views

Post comments don't show

Recently I found out the post's comments don't display in post url. for example this post https://akhbarejadid.com/196055/ has more than 50 comments as you can see in image below I don't know when ...
0
votes
0answers
7 views

how to show comments only author which send own posts in wordpress

I am trying to make things work like where author can see only them post comment in admin comment section . While admin should have all permission. I am having author's post comments in comment ...
0
votes
0answers
18 views

How to add comments to my custom post type but hide it from default WordPress Comments section?

<?php if (isset($_POST['submit_tickets'])){ $tickets_reply = $_POST['tickets_reply']; $faqpress_tickets_comment_data = array( ...
0
votes
0answers
42 views

How to rename/change the comment labels in WordPress backend?

The screenshot shows what to change.
0
votes
0answers
18 views

How do I change where "You must be logged in to comment" directs users?

I've seen a few answers to this question on this site, but none are current and none are very well explained. Is there any definitive answer to this question? It seems like a lot of folks want to know!...
0
votes
0answers
32 views

How can I hide comment of the authors from their published posts?

How can I hide the comment of my authors about their own posts? I used plugins and it was successful, but the comments are displayed somewhere onthe posts of authors themselves and i cant do anything ...
0
votes
0answers
21 views

How to customize 'children comments' in Wordpress?

Hey i am using a callback for wp_list_comments. I took the Code from here - 5balloons.info/custom-html-for-comments-section-in-wordpress-theme/ Now children comments are out of main comment (means ...
0
votes
0answers
31 views

Modify author url display in edit-comments.php

On our site the author url is almost always an IP. I want to show a visual flag next to the IP url if it matches a certain pattern. I just need to understand how to modify the output in the author ...
0
votes
1answer
27 views

How to remove some author fields from the edit comment page in wp-admin?

For a custom role, I've to remove/hide the email and URL fields in the author box inside the Edit Comment area in WP admin. Only the name field should be visible there. I've to keep the URL and email ...
0
votes
0answers
22 views

comment_post (if comment is approved OR $comment_approved === 1) not working?

I am working on a code through which I can send emails to the user when his/her comments get approved. then I get to know about comment_post. but it is not working. comment_post is working for the ...
0
votes
1answer
48 views

Wordpress Spam Comment Filter

I would like to filter wordpress comment!! I've just little knowledge about Php. I write a simple code to filter spam comment. But, I failed. Below my code! Can you please help me? add_action('...
0
votes
0answers
15 views

Control panel loads slowly due to 2 slow queries on comment table

Our WP site’s control panel loads very slowly. Analyzing this with the Query Monitor plugin, I see that it is slowed down by two queries, both on the comment table. First one: SELECT comment_approved, ...
0
votes
1answer
26 views

Embedding local video in Wordpress comments

I'm trying to embed a video file (from Media Library) in a comment. Adding the default code currently used in Posts didn't work: [video width="1280" height="718" mp4="https://...
0
votes
1answer
38 views

How to show username in reply to comment?

How to show username in reply to comment ? Please provide an example code on how to implement this. It needs to be done as shown in the picture:
0
votes
0answers
21 views

How to one click view all comments on post (WordPress Admin)?

What needs to be changed so that comments are loaded not in 10 pieces, but all comments once. If there are a lot of them, then many times necessary to push link to "show more comments". Code ...
0
votes
1answer
37 views

Change "No Comments" link to "My String" on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]

I'm trying to replace the standard "No Comments" link on blog posts to "Leave a Comment." I'm using the Sinatra theme. I can't find the code that creates this text. So, I'm ...
0
votes
0answers
27 views

Cannot Remove Title Reply from Custom Comment Template for Signup Page

Building a page template, I've managed to remove all the fields I do not need. All except for the title reply and "your email will not be published..." text. The general idea here is to use ...
0
votes
1answer
35 views

Counting Comments as Singular and Plural in comments.php Template

I need help on how to count single and plural comments in relation to how the text is formatted. Current output: Discussion: 1 comments and 1 answers Desired output: Discussion: 1 comment and 1 answer ...
0
votes
1answer
120 views

Only show own comments in admin panel

My website is a community blog! On the WordPress dashboard > comment I would like to show only the current user's comments. Other users' comments should be hidden and only visible for admins. Any ...
1
vote
0answers
31 views

Sending data from custom inputs in Wordpress comment form in the admin notification email

I have added a number custom inputs to the standard Wordpress comment form. Currently, I don't send these values to the database, but I know I can send this data to commentmeta table if I need to. I ...
0
votes
0answers
41 views

How to add code for wp-comments-post.php over functions.php?

I modified the file wp-comments-post.php by adding this in there: setcookie('addcomment', $_SERVER['HTTP_REFERER'], (time()+300), "/"); After 54 lines, in the end it became like this. ......
0
votes
0answers
37 views

Shortcode for Comments and Comment Boxes in Post Loop

Is it possible to get the comments and comment boxes for each post in a loop so users do not have to navigate to the actual single post page to leave a comment (and instead users can leave comments on ...
0
votes
0answers
27 views

Merge get_comments & get_posts into a single query

On the static home page, I want to display the latest site activity sorted by date in a social network style. I get the comments: $comments_query = get_comments( array( 'status' => '...
0
votes
0answers
17 views

How to create CSS Counters for Comments (depth 5)?

I'd like to add numbering to my comments, like this: comment 1.1 reply to comment 1.2 reply to comment 1.2.1 reply to reply comment comment I'm a web pro, so I generally understand how to use CSS ...
0
votes
0answers
19 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
10 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
19 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
14 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 ...
1
vote
1answer
59 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
19 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
15 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
90 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
22 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
39 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
18 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 ...
1
vote
0answers
36 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
30 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-...

1
2 3 4 5
38