Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wp-list-comments]

Displays comments, for a post of a post type that supports comments, based on a variety of parameters including ones set in the administration area.

1
vote
1answer
50 views

How do I create comment-reply-button using <span> element not <a>

I'm currently working to design my first WordPress blog and I got stuck when I came to code comment-reply-button because I want the comment-reply-button to be coded in span element only not a element ...
-1
votes
0answers
8 views

How to change font size of admin panel in Wordpress 5?

How do I change the font size of the admin panel in Wordpress 5 ? I want to enlarge the text size in admin pages, specially comments page at: /wp-admin/edit-comments.php
0
votes
0answers
30 views

Can't show most recent comment on top with wp_list_comments() for WooCommerce reviews

I am trying to break my comments (reviews) on my single product page into various pages, having the latest comments displayed on top of each pages and the latest comments displayed on the first page / ...
0
votes
1answer
138 views

How to stop ultimate members to redirect comment authors to user profile?

I'm having a problem with the Ultimate Member plugin. The comments author links get redirected to the user profile. I need the basic WP feature- pointing to author URL/website. The plugin is ...
0
votes
0answers
31 views

How to show comment author URL next to comment author?

By default, the comment author links to their URL. But I have changed that to their profile. Front-end profile generated by a plugin. Now when anyone clicks on author name they are redirected to the ...
0
votes
0answers
34 views

How to add delete, approve, spam Links to Comments

I am developing a plugin where I list all the available comments and then I want to have a links like Delete, Approve, Unapprove or Spam etc. I have followed a thread here: Add delete, approve, spam ...
0
votes
1answer
39 views

Disable Wordpress Comment Author Name

I am using the Wordpress theme Switty and was wondering how to entirely disable the comments section's poster. I need to create a member-only, anonymous comments section and am using Wishlist Member ...
1
vote
1answer
19 views

Check if comment was modified

Is there a way to check if a comment was modified so I can display a modified/edited tag? I can't seem to find anything anywhere or anyone asking about this. Also it doesn't look like the modified ...
1
vote
1answer
20 views

Diplay comment date on WP_Post_Comments_List_Table

I am trying to display each comment date on the comments list table on the post edit screen. Currently it only displays the Author name, IP address and comment content. https://developer.wordpress....
0
votes
0answers
33 views

change level of ul children in comment

The actual structure of my comments is in shape <ol> <li> <ul class='children'> <li></li> <li></li> <li> <ul ...
3
votes
1answer
361 views

Why does comment_reply_link launch the reply form at the wrong spot on the comment section?

I have this custom extended Walker_Comments class: class Custom_Comment_Walker extends Walker_Comment { var $tree_type = 'comment'; var $db_fields = array( 'parent' => 'comment_parent', '...
3
votes
1answer
336 views

change the comment time output to: X time ago instead of actual date and time

<?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?> Above is the default code that exists for comments.php in the WP Core. This will produce an Output like this: ...
0
votes
2answers
35 views

Make user's name display as the site name in comments if it matches certain roles

So here's what I'm trying to do. I'm working on a plugin and I want to check each comment and see if the author of that comment has a role of "administrator" or "editor". If they do, rather than ...
0
votes
1answer
39 views

Removing(replacing) avtar in comments.php with some other HTML arrangements

<ol class="comment-list"> <?php wp_list_comments( array( 'style' => 'ol', 'short_ping' => true, ...
0
votes
2answers
114 views

wp_list_comments() only returns when user is loged in

<?php if (!is_user_logged_in()) { ?> <p class="text-center"> برای ارسال نظر باید <a href="https://www. .com/login?redirect_to=<?php echo the_permalink();?>"><i class="fa fa-...
0
votes
1answer
341 views

Remove the function which adds nofollow to links in comments

Not sure where the function is that does this but i need to remove it so all links in comments do not contain the rel="nofollow" attribute. I know i can use the comment_text filter to remove nofollow ...
0
votes
0answers
81 views

edit-comments.php comment_row_actions ajax problem

On the edit-comments.php page, I'm hooking into the comment_row_actions filter to add another link at the end. I'm copying the "Approve" link, adding another query key and value and modifying the ...
0
votes
1answer
143 views

Cannot display comment in page

I added some custom fields in comment, so i have a couple of more fields. from that form I can comment but am unable to display that comment. The comments are set to moderation so admin have to ...
1
vote
1answer
414 views

Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)

I've set up a custom WP Comments Query that serves approved comments on posts ordered by date (basic stuff) and everything works fine except the fact that comments are displayed below each other and I'...
0
votes
1answer
82 views

Show comments based on user role in front end

I want to allow commenting on a custom post type by a specific user role. And a user can see only his comments only. Scenario is e.g User roles are student and instructor. The Student can comment on ...
0
votes
1answer
46 views

How modify comments metabox on post edit screen in Wordpress?

I search a solution for custom the comment's html on post edit screen when i click to the button "add new comment". I want to add a ACF field in the form. The codex not explain a solution... Or an ...
0
votes
1answer
203 views

standard callback function for wp_list_comments

I know that the code for the comment is generated in Walker_Comment::comment() and for html5 themes in the method Walker_Comment::html5_comment. But if I try to copy the code from that last method ...
0
votes
1answer
49 views

Same comments on all posts

I am working on a self-made theme and I have an issue where all of the comments are showing up on all the posts, instead of each post only showing their own comments. I am using this code to display ...
0
votes
1answer
553 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 ...
3
votes
1answer
2k views

comment_reply_link() not showing up

In functions.php I enqueue comment-reply and also define a callback function for use with wp_list_comments(): function theme_queue_js(){ if ( ! is_admin() && ...
0
votes
1answer
477 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
2answers
132 views

How Can I display the Current Logged-In User's Comment at the Top of the Comments Section in Wordpress?

What I'm trying to do is show the current logged in user's comment at the top of the list in the comments section in Wordpress on any given post. I don't care if it is just duplicated at the top and ...
2
votes
1answer
7k views

Change HTML Produced by wp_list_comments()

I am developing a WordPress theme for which I would like each comment's timestamp wrapped in in a <span> element for the sake of styling it with CSS rules. However, the wp_list_comments() ...
5
votes
2answers
3k views

Comment Walker vs. Comment Callback

I've been messing around with custom comments this week and I'm trying to figure out when I'd want to use a walker and when I'd use a callback... There's some things I can't quite figure out how to ...
0
votes
1answer
88 views

Paginated Comments “reply” does not work!

I use plugin Paginated Comments. I edit template and CSS in paginated-comments.php but "reply" does not work. "reply" does not appear at all. http://i.imgur.com/ieIeadO.jpg (There should be a button ...
1
vote
1answer
1k 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
89 views

Custom comment link

How can I customize my comment link without modifying comment-template.php file line 676: $link = $link . '#comment-' . $comment->comment_ID; I would like to get the same link just little ...
0
votes
0answers
74 views

Comments page id wp_list_comments

Under post i want to display last five comments. At next comment page or after click button "show more comments" I want to display all comments or set quantity comments to display. How can i do it? ...
1
vote
2answers
231 views

Limit comments displayed on basis of user_id

How can i limit comments displayed on the page - reviews by author_id. Lets say that the author_id to limit to is in variable $author_id_to_limit. Please tell me how to hook the function to do so. ...
2
votes
1answer
2k views

What is comment_karma?

While doing a var_dump on the $comment object, I see there is a comment_karma property. What is that?
0
votes
0answers
40 views

How to create a designated comment page with custom fields

I'm creating a site where I want to use the comment box to auto-generate a FAQ page. In essence, when a comment is posted it won't appear on the same page as the comment box. Instead, it will be ...
0
votes
1answer
66 views

Where are comments coded when using custom theme?

I am having issues displaying both the default comment system and a plugin comment system in Wordpress. Comments are enabled via Wordpress settings, comments are being made somehow via spam bots, but ...
1
vote
2answers
80 views

Commenter should see only his comments in wordpress

I'm building a site for a research and my participants will be all logged in to use the site. I would like to make these participants able to see only their own comments, so other users' comments will ...
1
vote
1answer
239 views

How to get comment id in callback function?

I am trying to get the comment ID in the custom callback function that I can use in wp-list_comments. Any help on how to do this? Thanks in advance I am using wp_list_comments as: ...
0
votes
1answer
4k views

Enable nested comments in Theme

I am trying to enable nested comments in my theme. I am new to all this stuff but I am doing my best. This is the code that I have in my comments.php <?php if ( get_comment_pages_count() > 1 &...
1
vote
0answers
764 views

Display date and time in comments

I use wp_list_comments(); to display a list of comment in WordPress. But it does show the format characters instead of the correct datetime. How can I fix this bug? Thank you.
1
vote
1answer
297 views

$reverse_top_level works the opposite way according to Codex?

The Codex for wp_list_comments states $reverse_top_level (boolean) (optional) Setting this to true will display the most recent comment first then going back in order. For my it is actually the ...
0
votes
1answer
177 views

How to get the number of pages when paginating comments?

I want to display threaded comments via ajax using pagination. If I use this code to display comments for page 1 how can I know if there is something more to be displayed on page 2? If there is ...
0
votes
1answer
4k views

How does “Your comment is awaiting moderation” work?

The question here is if someone could help me to make the comment "Your comment is awaiting moderation" work correctly for custom page. It works ok for standard Wordpress page but not for my own page. ...
2
votes
1answer
1k views

Comment `Reply` link doesn't work if comments are loaded from ajax

I am writing a plugin that displays custom home page that is in fact only one post with comments. The first time home page is displayed by the initial call by php. Then user can click a menu button to ...
1
vote
2answers
439 views

Can wp_list_comments output into variable?

Is there any way how to output wp_list_comments() into a variable? Something like $output = wp_list_comments(array('reverse_top_level' => false ), $comments); I am writing a plugin and it would ...
0
votes
1answer
720 views

How to get particular data from wp_list_comments outside the loop?

I need some help,very much new to wordpress. I need only comment title and comment date from wp_list_comments function in my post, calling from outside loop, after declared $postid as global variable....
0
votes
0answers
134 views

Theme comment callback results nothing

I made theme and now im finally editing the look of wp_list_comments. I made function, wrote callback link to arguments and tried it. It returns nothing - only elements hard coded in comments.php are ...
0
votes
1answer
644 views

How to get comments other than using wp_list_comments?

I'm sure you guys are wondering, "why the hell?" - basically it is because it does not work with a plugin by NextSCRIPTS that pulls comments from facebook. When I'm in the admin panel I see the ...
1
vote
1answer
1k views

Load comments.php template outside the post loop

I'm loading a post via ajax and outputting using $post = get_post( $post_ID ); Is there a way to load the comments.php template after I've output my post? I tried using: global $withcomments; $...