Title: Show second newest post
Last modified: August 21, 2016

---

# Show second newest post

 *  [aled2305](https://wordpress.org/support/users/aled2305/)
 * (@aled2305)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/show-second-newest-post/)
 * Hello, I currently use
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
             <?php
           // Fetch most recent posts, limit to 1
       		$latest_posts = get_posts( array(
       			'posts_per_page' => 1,
       		) );
           // get first and only item in array
       		$latest_post  = $latest_posts[0];
       	?>
   
       	<h3><a href="<?php echo get_permalink( $latest_post->ID ); ?>"><?php echo $latest_post->post_title; ?></a></h3>
       	<?php if ( has_excerpt( $latest_post ) ) : ?>
       	<p><?php echo $latest_post->post_excerpt; ?></p>
       	<p>
       	  <?php else : ?>
       	  <?php echo strip_shortcodes(wp_trim_words( $latest_post->post_content, 50 )); // '250' is number of words ?>
   
       	  <?php endif; ?>
   
       	  </p>
       	<p><a href="<?php echo get_permalink( $latest_post->ID ); ?>"> Read More...</a></p>
               </div>
       ```
   
 * to show my most resent post, but what need’s to be changed to show the second
   most resent post?
 * Thanks
 * Aled

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

 *  [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * (@wpranger)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/show-second-newest-post/#post-4266949)
 * Use WP_Query instead. Along these lines:
 *     ```
       $the_query = new WP_Query( 'offset=1' );
   
       [---- Your Loop   -----]
   
       wp_reset_postdata();
       ```
   
 *  Thread Starter [aled2305](https://wordpress.org/support/users/aled2305/)
 * (@aled2305)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/show-second-newest-post/#post-4266957)
 * Sorry [@wpranger](https://wordpress.org/support/users/wpranger/) but I’m new 
   to wp coding. HTML and CSS i’m fine with but I haven’t a clue what you mean. 
   The code I used I found online, therefor could you please explain a bit more.
 * Thanks
 * Ale
 *  [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * (@wpranger)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/show-second-newest-post/#post-4266978)
 * If you look on the [WP_Query codex page](http://codex.wordpress.org/Class_Reference/WP_Query),
   there are quite a few examples of loops for you to look at.

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

The topic ‘Show second newest post’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/show-second-newest-post/#post-4266978)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
