1
vote
1answer
42 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 ...
0
votes
0answers
6 views

Count comments + last pub date for subcategories

How do I get the comment count for a subcategory in this loop? So every child category of 225 had comments. That amount I want to list per child. Tried some stuff with get_comments, but unsuccessful ...
0
votes
0answers
22 views

My WordPress comments appear repeated even though it is not

My WordPress comments appear repeated even though it is not. It get repeated n times as comment exists. Here is my comment.php code: <?php function my_comments_callback( $comment, $args, $depth ...
0
votes
0answers
53 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
24 views

Load Paginated Comments Inline

Currently my WordPress blog loads the comments in paginated results (loading all at once slowed down the blog too much); first displaying the oldest 50, after clicking "<< Older Comments" it ...
0
votes
1answer
24 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
342 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
55 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
2answers
70 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
2answers
158 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
0answers
43 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 ...
0
votes
2answers
391 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
47 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
37 views

Author page link in comments is different than in posts?

When I hover over the comment author link on my comments, it shows a link like http://mysitenameeeee.com/?author=24 After I click it, it gets me to /author/authorname, which is fine, but I don't want ...
0
votes
1answer
153 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
1answer
127 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
3answers
93 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 ...
2
votes
1answer
202 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 ...
1
vote
0answers
75 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
122 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, ...
2
votes
1answer
204 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?
0
votes
2answers
243 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
2answers
347 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
202 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 ...
0
votes
1answer
253 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 ...
3
votes
2answers
233 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: ...
1
vote
2answers
165 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
30 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 ...
4
votes
1answer
470 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 ...
2
votes
1answer
274 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 ...
4
votes
2answers
468 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 = ...
1
vote
1answer
975 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 ...
0
votes
1answer
160 views

Where to insert get_comments?

I'm trying to setup a page and extract comments from an external post. I took this advice how to pull wordpress post comments to a external page and now I have this get_comments code at my disposal: ...
4
votes
1answer
174 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”. ...
10
votes
1answer
390 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
3
votes
1answer
239 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
766 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 ...
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
823 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 ...
5
votes
1answer
234 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 ...
2
votes
2answers
427 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.
3
votes
2answers
442 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 ...
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, ...