Title: static front page plugin and recent posts
Last modified: August 18, 2016

---

# static front page plugin and recent posts

 *  [omz13](https://wordpress.org/support/users/omz13/)
 * (@omz13)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/)
 * If I activate the static front page plugin all works well… except that I’ve noticed
   that my list of recent posts in my sidebar is wrong (it then only shows a link
   for my home page).
 * So, when using static front page, how do I get a list of recent posts? ATM I’m
   using this code in my sidebar
 * `<?php
    query_posts('posts_per_page=5'); if (have_posts()) : while (have_posts()):
   the_post(); ?> <p class="sidebar-footer" style="padding-top:3px;margin:0;">_¶_"
   title="Permalink for : <?php the_title(); ?>"><?php the_title(); ?> <?php endwhile;
   endif; ?>

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/#post-353492)
 * Try this:
 * `<?php
    $recent = new WP_Query('showposts=5'); while ($recent->have_posts()) :
   $recent->the_post(); ?> <p class="sidebar-footer" style="padding-top:3px;margin:
   0;"><em>&para;</em> <a href="<?php the_permalink(); ?>" title="Permalink for :
   <?php the_title(); ?>"><?php the_title(); ?> <?php endwhile; ?>
 * Note that WP_Query() can accept the same arguments as query_posts(). More on 
   WP_Query:
 * [http://codex.wordpress.org/Function_Reference/WP_Query](http://codex.wordpress.org/Function_Reference/WP_Query)
 *  Thread Starter [omz13](https://wordpress.org/support/users/omz13/)
 * (@omz13)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/#post-353498)
 * Thanks for the suggestion, but it makes no difference… the recent posts lists
   is still borked 🙁
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/#post-353502)
 * Then I’d recommend either going with a different solution for displaying a Page
   on your front page ([my plugin may work for you](http://guff.szub.net/2005/01/27/get-a-post/)),
   or wait and see if Denis can provide a workaround to his plugin… `:)`
 *  [Denis de Bernardy](https://wordpress.org/support/users/denis-de-bernardy/)
 * (@denis-de-bernardy)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/#post-353623)
 * There’s no workaround as far as I can tell: The static front page plugin overrides
   the WP query on the home page. You can’t use query_posts() as a result, since
   it gets filtered exactly the same way as the main query.
 *  Thread Starter [omz13](https://wordpress.org/support/users/omz13/)
 * (@omz13)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/#post-353631)
 * Thanks Denis. Sorry to hear it works that way 🙁
 * I’ve now switched to Kaf’s plugin and that seem to work (after I did a bit of
   tweaking).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘static front page plugin and recent posts’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [omz13](https://wordpress.org/support/users/omz13/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/static-front-page-plugin-and-recent-posts/#post-353631)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
