/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<ul> <?php query_posts('orderby=comment_count&posts_per_page=>5'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?> (<?php comments_number('0','1','%'); ?>)</a></li> <?php endwhile; ?> <?php else : ?> <li>Sorry, no posts were found.</li> <?php endif; ?> </ul>
Comments
