I'm kind of surprised I didn't post this already (maybe I did and I just can't find it) – but on another blog, I have drop down comments set so it only does this for the first 'x' number of posts with comments. (Otherwise download times can get a little bogged down if there's a lot of posts with comments on the page…) To do that I have this at the top of my page:
<?php
$showcommentmax = 3;
$currentshowcomment = 0;
?>
Then I have this code around the drop down comments call:
<?php
if ($showcommentmax > $currentshowcomment) {
include(ABSPATH . 'wp-dropdown-comments.php');
if (get_comments_count() > 0) {
$currentshowcomment++;
// only counting show comment if it there are comments to show
}
}
?>
Related posts:
- Striping IMG tags from the_content in WordPress (and how to fudge page excerpts) Background: For a site I was working on, I was...
Related posts brought to you by Yet Another Related Posts Plugin.
scriptygoddess
