The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
43 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
56 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
343 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
159 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 ...
0
votes
1answer
53 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
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
393 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
128 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
123 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
244 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
350 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
204 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
528 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
254 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 ...
1
vote
2answers
445 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 ...
4
votes
1answer
473 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
469 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 = ...
0
votes
2answers
297 views

Get comments after specific date

I don't think this is a parameter in get_comments( $args ); so I'm using a SQL statement. First I obtain a comment date from a separate table I created. Afterwards, I want to retrieve all comments ...
0
votes
1answer
769 views

Display of comment_date within get_comments?

Any way to change how the date is displayed with get_comments..? I have the following.. <?php $comments = get_comments( array( 'post_id' => $post->ID, 'number' => ...
1
vote
1answer
111 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
978 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: ...
0
votes
1answer
313 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 ...
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”. ...
0
votes
1answer
1k 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 = ...
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
2
votes
1answer
154 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., ...
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
767 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 ...
1
vote
1answer
724 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 ...