Title: PHP Help
Last modified: August 18, 2016

---

# PHP Help

 *  [WizzKid](https://wordpress.org/support/users/wizzkid/)
 * (@wizzkid)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-help-2-2/)
 * Hey Guys,
 * If you look at my website ([http://www.wizzhack.co.uk](http://www.wizzhack.co.uk))
   I have a pull down menu, Categories and the code is:
 * `<?php wp_list_categories('sort_column=name&title_li='); ?>`
 * Whats the one to show most recent comments?
 * Thanks,
 * WizzKid

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-help-2-2/#post-636285)
 * There is no template tag for recent comment, but there is a Widget. Of course
   you could look at wp-includes/widgets.php to see how it ‘gets done’.
 * There’s also plugins that will handle recent comments.
    See [Plugins/Archive](http://codex.wordpress.org/Plugins/Archive)
 *  Thread Starter [WizzKid](https://wordpress.org/support/users/wizzkid/)
 * (@wizzkid)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-help-2-2/#post-636299)
 * Thanks very much,
 * Was looking at:
 * And it seems to be: [http://www.semiologic.com/software/widgets/recent-comments/](http://www.semiologic.com/software/widgets/recent-comments/)
 * `<?php the_recent_comments(); ?>`
 * Thanks,
 * WizzKid
 *  Thread Starter [WizzKid](https://wordpress.org/support/users/wizzkid/)
 * (@wizzkid)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-help-2-2/#post-636302)
 * Thought I had it, but didnt 🙁 I will look into it more!
 *  [daddysunny](https://wordpress.org/support/users/daddysunny/)
 * (@daddysunny)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-help-2-2/#post-636348)
 * You can’t use that tag on its own. You have to install the plugin to go with 
   it, and then it works.
 * I have my own ‘hack’ for this… although I don’t know which puts less load on 
   the server:
 * `
    <?php $query1 = " SELECT wp_comments.comment_ID, wp_comments.comment_author,
   wp_comments.comment_post_ID, wp_posts.post_title FROM wp_comments, wp_posts WHERE
   wp_comments.comment_post_ID = wp_posts.ID AND wp_comments.comment_approved = '
   1' ORDER BY wp_comments.comment_date_gmt DESC LIMIT 15"; $result1 = mysql_query(
   $query1); while ($r1 = mysql_fetch_array($result1)) { extract($r1); echo "[$comment_author](https://wordpress.org/archives/$comment_post_ID?output_format=md#comment-$comment_ID)
   on <i>$post_title</i>
 * ";
    } mysql_free_result($result1); ?>

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Help’ is closed to new replies.

 * 4 replies
 * 3 participants
 * Last reply from: [daddysunny](https://wordpress.org/support/users/daddysunny/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/php-help-2-2/#post-636348)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
