1
vote
1answer
39 views

List all posts commented by current user

I need a page to display all posts (in Foods custom post type) that have comments by the logged in user. The list just needs to show the title with link to the title. Is this possible? What I've ...
0
votes
0answers
58 views

Comments_template doesn't work

If I use comments_template(); it does not work at all. But if I change it to global $withcomments; $withcomments = 1; comments_template( 'comments.php', true ); it displays the comments ...
0
votes
0answers
11 views

Adding comment template on a loop into a page

I've created a loop in a page, with a single post per page. The type of post is the default "post". Now, I've resolved the problem of pagination on this page, but I cannot show the comment template on ...
0
votes
1answer
282 views

get comments and get posts in loop

I need to get posts done by specific users and get also comments done to these posts, so far I can get the posts and comments but can't get how to do it in loop properly, because now I get the same ...
-2
votes
1answer
140 views

displaying recent comments outside loop without plugin

So I wanted to display the 10 most recent comments from my blog onto my homepage. Can anyone tell me how to do that? preferably without using a plugin if possible... thank you.
2
votes
1answer
290 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 ...
0
votes
1answer
169 views

display only parent replies count in index.php

Currently my posts display the total count of comments (i.e both replies and sub-comments). I want to display only the number of reply count in my index.php (and not comments for a reply) for each ...
0
votes
2answers
140 views

show posts from one category with comments only

Would anybody have a good idea for getting the WP to spit out all posts from a category with (approved) comments only? I have an ecommerce site set up, and treat comments on product posts as ...
0
votes
2answers
208 views

Getting Post Permalink Outside of Loop Not Working

I'm trying to get post's permalinks outside of the loop via a wordress plugin. Nothing seems to be working. Here is the original code that does not link to any permalink. public function ...
1
vote
1answer
67 views

How to list posts with disabled/closed comments, with pagination?

i'm interested how to display all posts (from all categories) that have closed/disabled comments? I have tried using the comments_open() function inside the loop, that works, i don't know how to ...
1
vote
0answers
64 views

Display posts with comments closed, with pagination?

i'm using a custom query, which needs to display all posts with closed comments. I have this <?php $the_query = new WP_Query('showposts=-1'); ?> <?php while ($the_query -> have_posts()) ...
0
votes
1answer
302 views

Loop not displaying comments_popup_link

I cannot get the comments_popup_link to display with the posts retrieved by the foreach loop. Only the title and permalink are displayed. Any idea why the comment link is left out? <?php ...
0
votes
1answer
462 views

How to sort posts by the average of comment meta values

Here's the situation- I've customized the comment submission whereby users can provide a rating, and this gets stored as a meta value in the commentmeta table. I can query to return the average ...
0
votes
1answer
239 views

How / where is the wp_query object created for RSS feeds?

Looking at the code in feed-rss2.php and feeds-rss2-comments.php, after the header preamble, we have a Loop - eg in feeds-rss2-comments.php: if ( have_comments() ) : while ( have_comments() ) : ...
6
votes
3answers
5k views

Getting Post Comments for post ID using WP_Query() and a Custom Loop?

(Moderator's note: The original title was "Is there a way to get post comments by post ID on a custom loop using WP-Query()?") Hi! I'm running a custom loop using WP_Query, that only displays one ...