1) show ten most recent excerpts, random order
<?php
query_posts('showposts=10&order=RAND');
if(have_posts()): while(have_posts()): the_post(); ?>
<?php the_excerpt(); ?>
<?php endwhile; endif; ?>
2) show 25 most recent posts
<?php
query_posts('showposts=25');
if(have_posts()): while(have_posts()): the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
more info on queries here.
Thread Starter
gili
(@gili)
Thanks.
I didn’t explain myself correctly about the first query i need:
I need to display only posts which have no comments.
The question is how to tweak the first query to display only posts with no comments.
Thanks,
Gili
I suppose you could check to see if comments are associated with the post, but that would require a custom function. You’d probably have to query the database first because there’s no existing parameter for checking if there’s comments or not (not that I’m aware of anyway) and use that to add to your query. I don’t know of any plugins that do this, but a forum search comes up with a bunch of stuff. Maybe one of those can help you?