Title: Help with mini loop needed please
Last modified: August 18, 2016

---

# Help with mini loop needed please

 *  [emerritt](https://wordpress.org/support/users/emerritt/)
 * (@emerritt)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/help-with-mini-loop-needed-please/)
 * I want to display links to my latest posts on a static front page and found this
   which has been really helpful: [http://codex.wordpress.org/Creating_a_Static_Front_Page](http://codex.wordpress.org/Creating_a_Static_Front_Page)
 * So now I have this:
 * <?php
    $how_many=10; //How many posts do you want to show require_once(“journal/
   wp-config.php”); // Change this for your path to wp-config.php file ?>
 * <?
    $news=$wpdb->get_results(“SELECT ID`,`post_title` FROM $wpdb->posts<br />
   WHERE post_status\`= \”publish\” ORDER BY ‘ID’ DESC LIMIT “.$how_many); foreach(
   $news as $np){ printf (“<dl><dt><span class=\”date\”>%s</span>%s</dt><dd>%s</
   dd></dl>”, $np->ID,$np->post_title); }?>
 * I would like to add date and an excerpt next to each post title. Any help would
   be much appreciated.

The topic ‘Help with mini loop needed please’ is closed to new replies.

## Tags

 * [miniloop](https://wordpress.org/support/topic-tag/miniloop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [emerritt](https://wordpress.org/support/users/emerritt/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/help-with-mini-loop-needed-please/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
