Title: Problems with a mini-loop
Last modified: August 18, 2016

---

# Problems with a mini-loop

 *  [lust4maggie](https://wordpress.org/support/users/lust4maggie/)
 * (@lust4maggie)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/problems-with-a-mini-loop/)
 * I am trying to add the 5 most recent posts from my blog to the homepage of my
   website (just an index.html page). I am looking at how to make a mini-loop on
   the support pages, but it deosn’t work. [
    When I follow these instructions this
   is the output I get:
 * # get_results(“SELECT `ID`,`post_title` FROM $wpdb->posts WHERE `post_status`
   = \”publish\” ORDER BY ‘ID’ DESC LIMIT “.$how_many); foreach($news as $np){ print(“
   ID); print (“\”>$np->post_title
    “); } ?>
 * Can anyone help me out?

The topic ‘Problems with a mini-loop’ is closed to new replies.

## Tags

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

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

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
