Title: Unique latest post
Last modified: August 22, 2016

---

# Unique latest post

 *  [Jessi](https://wordpress.org/support/users/wbjtk/)
 * (@wbjtk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/)
 * Hey all
 * I couldn’t find this topic anywhere, so excuse me if it’s already been asked.
 * I am trying to change my blog page so that only the latest/top post shows full
   content, the featured image and the comment box, and for the rest of the entries
   below it to show just their titles without any content snippets.
 * Is there a way to set it up so I can edit the code for just the latest post, 
   and then I will just edit the main loop to only show the titles for the rest 
   of the posts?
 * My first instinct was “first-child” but that more pertains to css styling, not
   really what i’m trying to achieve.
 * Am I on the right track?
 * Site is here: perspectiveinaction.com
 * Thanks in advance

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

 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170230)
 * Hi,
 * You seem to have a good knowledge of PHP. There are many ways to do this but 
   one I could think of is that you should have 2 loops one limited to show only
   one post which is your latest post and the other one to only show the Titles.
 * Have a look at this: [Query Posts](http://codex.wordpress.org/Template_Tags/query_posts)
 * If you need I could have a look at your code and help you more to achieve this
   goal.
 *  [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * (@respectyoda)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170232)
 * Edsoltani, do not provide posters with your email.
 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170236)
 * respectyoda: thanks for the judgment but I think a poster is when you make profit,
   I’m offering to help for free. Why not you try to help some others for free instead
   of complaining about others gratitude 😉
 *  [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * (@respectyoda)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170238)
 * You need to understand the rules of this forum. Please read [this](http://codex.wordpress.org/Forum_Welcome).
   It specifically says:
 * **Forum members should not post their email addresses, ask others to post their
   email or solicit contacting people off of the forums. **
 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170239)
 * Thanks for the reminder, if you see I have already deleted the email address.
   Hope I haven’t done any harm to your business 😉
 *  Thread Starter [Jessi](https://wordpress.org/support/users/wbjtk/)
 * (@wbjtk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170241)
 * edsoltani, thank you for your help!!
 * I didn’t think I knew too much about php, but i think i could tackle this!! i’m
   going to give it a try and if i run into trouble, maybe you could see what im
   doing wrong – thanks!!
 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170244)
 * You are welcome, it should be fun to figure it out and I hope you do. I would
   be glad to help with any further questions.
 *  Thread Starter [Jessi](https://wordpress.org/support/users/wbjtk/)
 * (@wbjtk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170246)
 * Ok so everything is there, except for the second loop, it’s only giving me the
   latest post again. Do I have to reset the query or something?
 *     ```
       <?php query_posts('posts_per_page=1'); ?>
       				<?php if ( have_posts() ) : ?>
       					<?php while ( have_posts() ) : the_post(); ?>
       						<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       	<header class="entry-header">
       		<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
       		<?php dw_minion_entry_meta(); ?>
       	</header>
       	<?php if( has_post_thumbnail() ) : ?>
       	<div class="entry-thumbnail"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a></div>
       	<?php endif; ?>
       	<div class="entry-content">
       		<?php the_content(); ?>
       	</div>
       </article>
       <?php comments_template(); ?>
       <?php endwhile; ?>
       				<?php else : ?>
       					<?php get_template_part( 'no-results', 'index' ); ?>
       				<?php endif; ?>
   
       				<?php if ( have_posts() ) : ?>
       					<?php while ( have_posts() ) : the_post(); ?>
       						<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       	<header class="entry-header">
       		<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
       		<?php dw_minion_entry_meta(); ?>
       	</header>
       </article>
       <?php endwhile; ?>
       				<?php else : ?>
       					<?php get_template_part( 'no-results', 'index' ); ?>
       				<?php endif; ?>
       ```
   
 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170258)
 * Sorry I have Updated my post try this, this shows title and content for the latest
   post and titles of next 10 posts.
 *     ```
       <?php
       // The Query
       query_posts( 'posts_per_page=1' );
   
       // The Loop
       while ( have_posts() ) : the_post();
       	the_title();
           the_content();
       endwhile;
   
       query_posts( 'posts_per_page=10' );
       // The Loop
       while ( have_posts() ) : the_post();
           echo '<li>';
           the_title();
           echo '</li>';
       endwhile;
   
       ?>
       ```
   
 *  Thread Starter [Jessi](https://wordpress.org/support/users/wbjtk/)
 * (@wbjtk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170262)
 * Woohoo there it is!
 * Not only have you solved my issue, but you’ve taught me something along the way!!
   =) thank you so much for your help
 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170274)
 * I’m glad I helped. You are most welcome.
 *  Thread Starter [Jessi](https://wordpress.org/support/users/wbjtk/)
 * (@wbjtk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170279)
 * any clue how to omit the last post from the second query? it is shown again (
   not sure if we can avoid this using this method)
 *  Thread Starter [Jessi](https://wordpress.org/support/users/wbjtk/)
 * (@wbjtk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170287)
 * solved that myself lol
 * on the second loop, add the offset=1. This query is telling the loop to only 
   display 5 posts which follow the most recent post (1).
 * `<?php query_posts('posts_per_page=10&offset=1'); ?>`
 *  [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * (@edsoltani)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170336)
 * Great! You knew what you were doing, so I’m not surprised. Good Luck with the
   rest.

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

The topic ‘Unique latest post’ is closed to new replies.

 * 14 replies
 * 3 participants
 * Last reply from: [edsoltani](https://wordpress.org/support/users/edsoltani/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/unique-latest-post/#post-5170336)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
