Title: Latest headlines
Last modified: August 19, 2016

---

# Latest headlines

 *  Resolved [cody81](https://wordpress.org/support/users/cody81/)
 * (@cody81)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/latest-headlines/)
 * I am working on a blog, [here lookz](http://www.rakapuckar.nu)
 * I want the last 10 headlines to be shown in a column in the upper left area, 
   beside the maincontent window.
 * I need to create a new column with css, and then using some code from the archive.
   php file i suppose…
 * I also need to make a backup of it all.

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

 *  [takien](https://wordpress.org/support/users/takien/)
 * (@takien)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/latest-headlines/#post-1141877)
 * use this code snippet..
 *     ```
       <?php
       $cat = 2; // ID of the category you want to show...
   
       $recent = new WP_Query("cat=". $cat ."&showposts=10"); // showposts=10 means you want to show 10 latest headlines
       ?>
       <ul>   
   
        <?php while($recent->have_posts()) : $recent->the_post();?>
   
       <li>
           <a href="<?php the_permalink(); ?>"><?php the_title(); // title of the each post ?></a>
       </li>
           <?php endwhile; ?>
       </ul>
       <?php
       //done
       ?>
       ```
   
 *  [yeahjack](https://wordpress.org/support/users/yeahjack/)
 * (@yeahjack)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/latest-headlines/#post-1142159)
 * is there a way to enable this for all categories?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/latest-headlines/#post-1142160)
 * Try:
 *     ```
       <?php
       $recent = new WP_Query('showposts=10'); // showposts=10 means you want to show 10 latest headlines
       ?>
       <ul>
        <?php while($recent->have_posts()) : $recent->the_post();?>
       <li>
       <a href="<?php the_permalink(); ?>"><?php the_title(); // title of the each post ?></a>
       </li>
       <?php endwhile; ?>
       </ul>
       <?php
       //done
       ?>
       ```
   
 *  [yeahjack](https://wordpress.org/support/users/yeahjack/)
 * (@yeahjack)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/latest-headlines/#post-1142161)
 * thats great, thanks a lot!

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

The topic ‘Latest headlines’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [yeahjack](https://wordpress.org/support/users/yeahjack/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/latest-headlines/#post-1142161)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
