Title: recent posts in sidebar.php
Last modified: August 19, 2016

---

# recent posts in sidebar.php

 *  [pookey](https://wordpress.org/support/users/pookey/)
 * (@pookey)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-in-sidebarphp/)
 * What do I have to write, to get recent posts in my sidebar? I also want to style
   the recent posts links later.
 * I tried this:
 * <?php query_posts(‘showposts=10’); ?>
    -  <h2>Recent Posts</h2>
 *  -  <?php while (have_posts()) : the_post(); ?>
    - 
    -  <?php endwhile; ?>
 * But my page and post links stopped working! Looked like the page updated when
   you clicked the links, but the content (the posts) didn’t do anything!
 * Please help me someone!! I have to get this to work!
 * /Hans

Viewing 1 replies (of 1 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-in-sidebarphp/#post-703145)
 * Why do you yell in all your titles?

Viewing 1 replies (of 1 total)

The topic ‘recent posts in sidebar.php’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-in-sidebarphp/#post-703145)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
