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
3
votes
1answer
1k views

How to move comments form above comments list in wordpress

Please help me modify code to move Comments form above comments list in a WordPress blow. Below is the code of comments.php page <?php /** * The template for displaying Comments. */ ?> <?...
0
votes
3answers
4k views

Adding comments to my custom theme

I would like to add comments to my single.php file. My custom theme is "hand built" and I haven't found the proper code needed to add this functionality. Anyone have the quick and dirty on how to add ...
0
votes
1answer
1k views

&nbsp not working in comments

In WordPress comments spacing are not working. When i am using &nbsp in comments for spacing, WordPress showing these as it is on front end. Other html tags are working but this one is not working....
1
vote
1answer
1k views

Ajax load more button for comments wordpress

I have my own Ajax load more button system but for posts now i decide to make the same thing but for comments so after check get_comments i found that i can't get the CURRENT page of comments like ...
0
votes
0answers
17 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
4 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
1answer
1k views

How to get the 5 most recent comments and each comment 5 most recent replies (children)

I want to get the 5 most recent comments and each comment's 5 most recent replies (children) in descending order. With the following code I can get the 5 most recents comments but it won't distinguish ...
2
votes
1answer
704 views

edit_comment capability for subscriber

I have given my site's subscriber role the following permissions (unserialized DB-query): [subscriber] => Array ( [name] => Reader [capabilities] => Array ( ...
0
votes
0answers
34 views

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

The screenshot shows what to change.
0
votes
0answers
11 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
1answer
820 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 $wp_meta_boxes;...
0
votes
0answers
16 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
1answer
951 views

edit comments in front end

I build my custom comments template. And i realised tht edit comment is being done in back-end ( dashbord). Is there any way to enable edit comments in the front-end instead of in admin menu? Would be ...
0
votes
2answers
761 views

Get first comment link on the post itself

I have this function and a link to a post: <?php foreach ($results as $id) { $post = &get_post( $id->ID ); setup_postdata($post); <li><a <?php href="<?php ...
0
votes
1answer
715 views

Posting a comment redirects admin/users to blank page

I have looked a lot on this problem on forums and tried out a few of the solutions but nothing seems to work for me. When I try to comment here: http://www.chicitout.co.nf/crochet-lace-skater-dress/ ...
0
votes
0answers
29 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
1answer
971 views

Comment section not appearing on posts

My comment section simply does not appear on posts, even though on my first couple test posts, it did appear. The current theme I'm using is Tesseract, in case that is relevant. Before that I was ...
0
votes
0answers
16 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
28 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
22 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
1answer
47 views

How can I style the Comment Section of a blog post

I am trying finish styling this page. Once someone posts a comment, it looks like this (see below). I am trying to get the background area just plain black, just like the actual blog text. Then the ...
0
votes
1answer
43 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
17 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 ...
3
votes
2answers
2k views

Why is Woocommerce writing in my wp_comment table?

Couple of days ago I was checking the size of my database and I was amazed on how huge it is. The most weird thing for me is that my site is not using comments, and still the wp_comment table is more ...
3
votes
2answers
2k views

Does WordPress Allow Blank/Empty Comment Submissions In WordPress?

I've got a great Comment Form and Threaded Comments setup by using the native WordPress functions: comment_form and wp_list_comments. However, I'm trying to also create a custom Contest Comment ...
1
vote
2answers
973 views

Troubleshooting Emoji in Comments

Just updated my local and live installs for a side project to 4.2 in order to take advantage of the newly added Emoji features. Emoji are working just fine on my local machine, but they seem to not be ...
0
votes
1answer
901 views

Difference between date and date_gmt

In my database comment_date and comment_date_gmt are different. comment_date is in UTC+3, but comment_date_gmt in UTC+0. Why? What do I not right? When I leave the comment I can see "You left a ...
0
votes
1answer
22 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
0answers
11 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
2answers
666 views

Actual comments not showing, but form is?

I have edited the comments form to remove a few fields and now the approved comments don't show up, just the form itself. What am I missing from this? <?php $comment_args = array( 'fields' =&...
0
votes
1answer
35 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
1answer
677 views

How to import facebook comments to Wordpress database?

I want to get rid of Facebook Comments from my website, but I have a lot of comments there. Is it possible to import facebook comments to normal Wordpress comments system or something else (i.e. ...
2
votes
1answer
2k views

Retrieve comments from current post using SQL

I am trying to use this code below to auto-refresh comments but at the moment it is displaying all comments. I would like to only show comments for the current post. I am not very experienced with SQL ...
0
votes
1answer
36 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
17 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 ...
4
votes
4answers
5k views

Set post comments open function

I've been searching high and low for a php function to set a comments of a given postID open only found function to check what the comment status is <?php comments_open( $post_id ); ?> I ...
0
votes
0answers
21 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
107 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 ...
0
votes
1answer
31 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
2answers
2k views

Wordpress error when sending comment

I'm using the default comments template. When I send a comment I get the following error message: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '...
0
votes
0answers
35 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. ......
1
vote
0answers
29 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 ...
1
vote
0answers
119 views

Comments invisible after moving Wordpress to new server, while commenting still works

I moved a wordpress installation from one server to another. I dumped the DB, copied over all the files, put all DB data into a new database, changed wp-config.php to the new database info, and after ...
1
vote
1answer
926 views

Custom comments list, right depth

I created a custom comments_list() function, it works fine, the only problem is to show child comments inside the parent div. It works well with first and second depth levels but not for others. This ...
0
votes
0answers
29 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
25 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' => '...
3
votes
3answers
462 views

Comments waiting but no comments found

So, I have a weird problem, and I'm not sure this is the right place to ask it, but I'm going to try because all other options have failed. I have a site that is running WPML and WooCommerce. On this ...
0
votes
0answers
15 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
1answer
1k views

Make custom Wordpress comments list

i'm making a custom Wordpress template and I've made this HTML code for single comment template: <div class="comment" id="1"> <div class="useravatar" style="background-...
0
votes
3answers
5k views

Trying to get property of non-object notices in comment-template.php

I need some customization of WORDPRESS comment area, so I've used this code in my child theme : <div id="comments" class="x-comments-area"> <?php if ( have_comments() ) : ?> ...

1
2 3 4 5
38