Title: Display recent post and CSS
Last modified: August 18, 2016

---

# Display recent post and CSS

 *  [stainboy](https://wordpress.org/support/users/stainboy/)
 * (@stainboy)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/display-recent-post-and-css/)
 * Anyone know of a plugin which will display the recent post – headlines only –
   in the sidebar?
 * What to do if i want graphic elements as inline navigation beneath the header.
   Will this inflict on the set up ‘page’-structure, and what can be done?
    I’m 
   just hoping for some nice examples on this one…
 * Thank you very much,
    Kristoffer

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/display-recent-post-and-css/#post-309547)
 * 1. Here is one of the plugins:
    [http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/](http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/)(
   and there are more out there if you search: [http://codex.wordpress.org/Plugins](http://codex.wordpress.org/Plugins))
 * 2. There are also good articles on creating horizontal menus… you can find a 
   lot of good stuff in the Codex 🙂
    [http://codex.wordpress.org/Creating_Horizontal_Menus](http://codex.wordpress.org/Creating_Horizontal_Menus)
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/display-recent-post-and-css/#post-309557)
 * RE: Display recent post, here’s another *built-in* option:
 * `<?php
    $latest = new WP_Query('showposts=1'); $latest->the_post(); ?> <a href
   ="<?php the_permalink(); ?>"><?php the_title(); ?></a>
 *  Thread Starter [stainboy](https://wordpress.org/support/users/stainboy/)
 * (@stainboy)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/display-recent-post-and-css/#post-309749)
 * Kafkaesqui –
    That is nice… and works fine…
 * How would you output more than just the recent?
    How and where would you style
   this list?
 * All the best,
    Kristoffer
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/display-recent-post-and-css/#post-309763)
 * “_How would you output more than just the recent?_“
 * Knew that question would come up. 🙂
 * You’ll need to incorporate [The Loop](http://codex.wordpress.org/The_Loop) for
   handling multiple posts called through the WP_Query class. The following will
   display the last 3 posts in an unordered list (incorporates id and class attributes
   you can use with css for styling, per your second query):
 * `<ul id="latest">
    <li><h2>Latest posts</h2> <ul> <?php $latest = new WP_Query('
   showposts=3'); while($latest->have_posts()) : $latest->the_post(); ?> <li class
   ="recent-post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></
   li> <?php endwhile; ?> </ul> </li></ul>
 * For more, note the WP_Query class accepts the same arguments as query_posts():
 * [http://codex.wordpress.org/Template_Tags/query_posts](http://codex.wordpress.org/Template_Tags/query_posts)
 *  [qamuri](https://wordpress.org/support/users/qamuri/)
 * (@qamuri)
 * [20 years ago](https://wordpress.org/support/topic/display-recent-post-and-css/#post-309941)
 * I wanna thank Kafkaesqui!!!

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

The topic ‘Display recent post and CSS’ is closed to new replies.

## Tags

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

 * 5 replies
 * 4 participants
 * Last reply from: [qamuri](https://wordpress.org/support/users/qamuri/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/display-recent-post-and-css/#post-309941)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
