Title: recent posts help?
Last modified: August 18, 2016

---

# recent posts help?

 *  [ruick](https://wordpress.org/support/users/ruick/)
 * (@ruick)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/recent-posts-help/)
 * hey i got this code
 * <?php if (is_single()) : ?>
    - recent entries:
 *  -  <?php $latest = new WP_Query(‘showposts=5’);
       while ($latest->have_posts()):
      $latest->the_post(); ?> <?php $title = get_the_title(); if (strlen($title)
      >= 35) $title = substr($title, 0, 35) . ‘…’; ?>
    - 
    -  <?php endwhile; ?>
 * <?php endif; ?>
 * and i put it on my temporary site [http://www.kupuj-taniej.com/absorbdesigns/](http://www.kupuj-taniej.com/absorbdesigns/)
 * and the recent posts only show up when you click on individual blogs. how do 
   i make it show up on the homepage, and on every single page? this is in my side
   bar btw.

Viewing 1 replies (of 1 total)

 *  [oriecat](https://wordpress.org/support/users/oriecat/)
 * (@oriecat)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/recent-posts-help/#post-257065)
 * Delete the first and last line. is_single is telling it to only display when 
   using single.php, which is only used on single post views.

Viewing 1 replies (of 1 total)

The topic ‘recent posts help?’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [oriecat](https://wordpress.org/support/users/oriecat/)
 * Last activity: [20 years, 9 months ago](https://wordpress.org/support/topic/recent-posts-help/#post-257065)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
