The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
264 views

Get only one comment per post with get_comments

Is there a way to limit get_comments results to just the latest comment from every post?
0
votes
2answers
27 views

Is there a better way to check for a new comment?

I have some code that runs on the client that checks every 30 seconds or so for new comments, and if a new comment is found the user is alerted. The check count the comments on a page, and returns ...
0
votes
2answers
222 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
2answers
489 views

Show count of all comments by meta_value from a users posts

I'm trying to display the total number of comments for a users posts limited to a comment meta. I've tried using both get_comments() and WP_Comment_Query() but I get the same result of "1" for the ...
1
vote
1answer
237 views

Display User Role Next To Comment

I've search around but I can't seem to find exactly what I'm looking for and for the first time I don't even know where to start. How do I display the user role (Admin, Editor, Author Contributor, ...
0
votes
1answer
12 views

How to get replies of a comment?

Is there a way to get replies of a comment by its ID? I have searched on google but could not find anything about it. For example, I have a comment with ID 123 I want to display all the replies that ...
0
votes
1answer
30 views

Problem displaying replies as part of author's latest comments on author page

I've based a lot of my method on this thread here I can currently display 5 latest comments on an author template page. I want to display the latest 3 replies from any user for each 'main' comment ...
0
votes
1answer
59 views

Adding Parameters to get_comment

I have a code like this: <?php $comments = get_comments( 'post_id=' . $post->ID ); echo get_comment_author($comments[0]->comment_ID); ?> <br /> <?php $comments = get_comments( ...
1
vote
0answers
94 views

Loading Multiple Comments Pages via Ajax?

I have been searching Google and still haven't found any great ideas for making comments pages load via Ajax. After searching SE I found this older thread from just a few months ago which provides a ...
0
votes
0answers
7 views

Convert comments to posts and make it clickable on comment section

I am currently working on quite a big project for a client – he wants comments to behave like a post when a user clicks on them. I have read about some similar functionalities but nothing really like ...
0
votes
0answers
30 views

get_comments function returns diffrent values on different accounts, why?

If I am on my admin user, the function get_comments() returns the array of comments in the template, but for the subscriber, the array is just empty. I tried to add permission to the user but it ...
0
votes
0answers
75 views

get_comments() returns empty array if called through AJAX

I'm facing a quite strange issue with a simple get_comments() implementation in admin panel. Code is this (post ID is truly 1234) get_comments('post_id=1234&status=approve'); It returns proper ...
0
votes
0answers
57 views

Admin comment always on top of comment list / nested replies - possible?

I'd really just like a push in the right direction for this.. using a callback for a custom comment display so I can have 4 different forms of code and styles for: normal 'parent' comment normal ...
0
votes
0answers
126 views

Comments orderby comment date not working

I have a template to get the comment replies to a user and display it on a static page. It works reasonably well in so far as the correct comments are displayed but whatever I try I can't get the ...
0
votes
0answers
72 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 ...