Title: Recent Posts code
Last modified: August 19, 2016

---

# Recent Posts code

 *  [daenterpri](https://wordpress.org/support/users/daenterpri/)
 * (@daenterpri)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/recent-posts-code-2/)
 * Hello!
 * Does anyone know how I can get the following code to work for 3.0 MU? My sub-
   domain sites will NOT have their own blogs, but I would like all of them to display
   recent posts from the root domain:
 *     ```
       <ul>
                           <?php
                             $number_recents_posts = 6;//Can be how much you want
                             $recent_posts = wp_get_recent_posts( $number_recents_posts );
                             foreach($recent_posts as $post){
                               echo '<li><a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >' .   $post["post_title"].'</a><br /><div class="newsdate">Posted: '.$post["post_date"].'</div></li> ';
                             } ?>
                           </ul>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [daenterpri](https://wordpress.org/support/users/daenterpri/)
 * (@daenterpri)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/recent-posts-code-2/#post-1625432)
 * This is a recent posts script by the way.

Viewing 1 replies (of 1 total)

The topic ‘Recent Posts code’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [daenterpri](https://wordpress.org/support/users/daenterpri/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/recent-posts-code-2/#post-1625432)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
