The tag has no wiki summary.

learn more… | top users | synonyms

10
votes
1answer
461 views

Find out which moderator approved comment?

Is there any way to find out what moderators have approved a comment, and then display that information on the front-end? e.g. John says: "This is a great article" - Approved by Admin1
5
votes
1answer
247 views

Custom comment type based on thread level

I'd like to create a custom comment type based by thread level. The initial comment on a given post (top tier comment) would require the commenter to enter a title (I assume this would be a new ...
4
votes
2answers
609 views

Get comments for more than one post

I would like to get all the comments for a group of post (not only one post. I tried $comment_args = array('number' => '14', 'post_id' => '10,20,30,40' ); $comments = ...
4
votes
1answer
689 views

Aggregate comments, with pagination

I want to build a page that would display all comments, regardless of which post they're attached to. I also want that page to be paginated, since it'll potentially have 10,000+ comments. I'm not ...
4
votes
1answer
242 views

Get total number of comments from posts in a specific custom taxonomy

I’m having some difficulties trying to get total number of comments from posts within a specific custom taxonomy. The setup is as such: I’ve created a custom taxonomy for my posts, called “features”. ...
3
votes
2answers
297 views

How to get comments with mixed status using get_comments?

Is there a way to get comments with more than one status using get_comments function? Let's say I would like to get both trash and hold comments. It is possible to do the same with posts: ...
3
votes
2answers
462 views

Seperating custom post type comments from regular blog posts comments

I have a custom post type (gs_index) with commments enabled, and would like to display a list of recent comments only from that particular post type (outside of the loop) I would also like to display ...
3
votes
1answer
245 views

Custom comments

I'm trying to create a custom comments page with pagination. I have non-hierarchical custom type "apartments". It makes urls like: /apartments/ - for acrhive /apartments/%id%/ - for post page ...
2
votes
2answers
955 views

show un-approved comments at wordpress front end

I've almost finished coding up a function that allows contributers when they are the post author to manage comments left on their own post (portfolio) couldnt find a plugin to do it so had to get ...
2
votes
1answer
331 views

Can't show comments count per post outside loop

How can I show the amount of a comment per post outside the loop? I tried this in a function already: ' . get_comments_number . ' , but that outputted the text "array" on the screen... What do I have ...
2
votes
1answer
339 views

Display number of comment replies

I want to show the 3 most recent comments and have a small div underneath that shows how many replies each comment has (count how many comments where comment_parent => comment_ID). I do this by ...
2
votes
1answer
233 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 ...
2
votes
1answer
171 views

Threaded Comments Feature not working

If a reader posts a comment on my blog, I'm able to reply to it. But the reply is not appearing on the post page, even after approving the comment. Number of comments to that specific post is 3, i.e., ...
2
votes
2answers
577 views

Show last n comments

let's say I have posts with hundreds of comments, and that I want to show only the last N comments and then a link to a page read them all. How would I display the last N comments? Thank you, Dino.
2
votes
1answer
321 views

get recent comments of a particular category

I am using get_comments('status=approve&number=5') to display recent comments in my wordpress sidebar. I need to display the recent comments of a particular category. How to do this?
1
vote
1answer
327 views

get_comments() where parent is not 0

I need a way to get just the comments that aren't top level i.e. where parent is not 0. I've tried: $args = array( 'parent' => -0 ); $comments = get_comments($args); I know the parent ...
1
vote
2answers
616 views

Load comments per post on click with AJAX

I'm working on a theme that uses a slider to display blog posts. Beneath the slider is a pagination that displays like a timeline, with a date instead of a page number, calling the corresponding blog ...
1
vote
1answer
155 views

Get comments from post and sort by commentmeta value

I want to get all of the comments for a given post and return them in order by a meta_key's value desc high to low. Doesnt look like i can do this with get_comments() like i would like to. This will ...
1
vote
1answer
839 views

Display latest comments on page with pagination

Im trying to display latest comments from all the post on a page named comments, now im able to use <?php wp_list_comments('per_page=25', get_comments()) ?> and it gets all the comments but when ...
1
vote
1answer
21 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
203 views

How to limit users to one comment per post

I am using WordPress as a petition site and hacking the comments system to work as the petition signup. I would like to find out how I can limit a user to post only one comment per post. So far I can ...
1
vote
2answers
482 views

get_comments_number of depth-1 (Level 1) (1 post)

I selected only 2 levels of comment for my wordpress site. How can I display the number of comment of the first level ? (Depth-1)
1
vote
1answer
1k views

Query & Sort Comments by custom comment meta

I added a basic "favorite/recommend" functionality for posts and comments to a wordpress site I'm working on. I'm storing the total numbers of comment "likes" in a custom comment meta field ...
1
vote
0answers
91 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 ...
1
vote
1answer
180 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, ...
1
vote
2answers
212 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?
1
vote
1answer
33 views

Comment number does not increment

I am making a custom wordpress theme and when I add a comment to a post and retrieve the number of comments using get_comments_number() the number does not change. I do know the function works ...
0
votes
2answers
908 views

Getting comment count per post not working

I have this function: <?php $popular = new WP_Query('orderby=comment_count&posts_per_page=5'); ?> <?php while ($popular->have_posts()) : $popular->the_post(); ?> ...
0
votes
1answer
195 views

How to get most recent commented post above new submitted post in Wordpress?

I have this function: $ids = $wpdb->get_col("SELECT DISTINCT comment_post_ID FROM $wpdb->comments ORDER BY comment_date DESC LIMIT 0 , 30"); foreach ($ids as $id) { $post = &get_post( ...
0
votes
3answers
111 views

Show comment number per author per day

Is this possible? I've never seen it used, but I need it... I want to show for each author (if they are logged in) on their own profile page, the amount of comments they have posted today. If the day ...
0
votes
1answer
1k views

Comment Link from get_comments()?

I've got to update a bit of sloppy code that shows the 5 most recent comments across the entire blog. The code is using WordPress' get_comments() method, which doesn't appear to return comment id's, ...
0
votes
2answers
84 views

How to get posts and comments amount per hour, per year and per month?

I have this snippet: function count_user_comments_today( $uid ){ global $wpdb; $today = date('Y-m-d'); $tomorrow = date('Y-m-d', time() + 86400); $count = $wpdb->get_var( ...
0
votes
1answer
161 views

Get comments only for certain specific users in template file

To return comments for a specific user, I use the code below: $arg = array('user_id' => $userID); $coms= get_comments( $arg ); How can I modify the arguments of this function so that I get ...
0
votes
1answer
30 views

get only one last comment from each post

Lets say I have 5 posts where most recent comments placed. How can I get one comment per each of these posts? I want to use get_comments(). Is it possible? Post1: Comment 1 Comment 6 Post2: ...
0
votes
1answer
77 views

How to get comment_ID by post_ID in wordpress

I used get_comment() but its parameter is $comment_ID which I has to enter manually for previous comments from wp_comments instead of that I need to get current comment means last updated comment ...
0
votes
1answer
29 views

How can I grab and show the reader comments of my site

How can I grab and show the reader comments of my news site in a different page? Suppose, I have comments on a news site, into my posts. I want to show the comments (only the comments) into a ...
0
votes
1answer
842 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. ...
0
votes
1answer
63 views

Inserting a random number into an array [closed]

So what im trying to do is make a random offset for 'top comment', at the moment it's working great(with no offset) but I want to randomise the offset so it displays 1 of the top 5 comments by ...
0
votes
1answer
62 views

Change Wordpress comments url / word

Is this possible? For example, I want to change http://mysitesitesite.com/post-name/comment-page-1/#comment-452 to http://mysitesitesite.com/post-name/custonname-1/#customname-452 What should I ...
0
votes
1answer
68 views

How to get recent comment link

I'm getting 5 recent comments into my sidebar using the following code: <?php $recent_comments = get_comments('status=approve&number=5'); ?> <?php foreach ($recent_comments as $comment) ...
0
votes
1answer
757 views

paginate_comments_links() not working

I'm using paginate_comments_links() to get all the comments by the current user: <?php global $current_user; get_currentuserinfo(); $userid = $current_user->ID; $args = array( 'user_id' ...
0
votes
1answer
419 views

Get the latest comment from a custom post type where depth = 1?

Happy new year everyone. I've been struggling with this one for a while. I need to get the latest comment from a custom post type, but ignore any child comments i.e. only look at comments with a ...
0
votes
1answer
371 views

Show top commenters without using a plugin

I'm trying to create a small list of top commenters in my sidebar. I don't want to use a plugin, so I was googling for codes. All I could find was the following: function top_comment_authors($amount ...
0
votes
1answer
2k views

Get Comments: Direct link to specific comment + post title

I'm pretty sure that this can be solved quite easy, but for some reason I just can't get it to work. My current code looks like this: <?php $comments = ...
0
votes
1answer
1k views

recent comments filter by author, page, category

is there any way to display recent comments in a widget area only for one page? = Comments that are belongs to one page. comments of one category but not from admin ( or some other user ) I want ...
0
votes
2answers
872 views

how to pull wordpress post comments to a external page

Hello I would like to know if there is a way to pull the contents of comments on a post to a separate page from wordpress. currently this is what i have, i'd like to replace with a function to pull ...
0
votes
1answer
45 views

get_comments not working on custom post types

I am trying to get all the comments of the logged in user in the "foods" CPT but I'm still with no success. Here's my code: <?php $args = array( 'user_id' => $user->ID, ...
0
votes
2answers
26 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
1answer
66 views

get_comments not working consistantly with post_id

I am trying to get comments from another post. I am getting the post_id and doing a check to see if it has comments I can get the comments for the current post every time but for the other post I am ...
0
votes
1answer
107 views

Custom Nested Wordpress Comments with avatar

I am developing a theme and has no idea how wordpress handles the comment outputs. I have wp_list_comments in my comments.php, but I'm not sure how to customize the output to get the desired output ...