Title: Need latest 10 sticky posts code
Last modified: August 19, 2016

---

# Need latest 10 sticky posts code

 *  [elking10](https://wordpress.org/support/users/elking10/)
 * (@elking10)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/need-latest-10-sticky-posts-code/)
 * Hi guys,
 * As i mentioned in the title, i try to grab the latest 10 sticky posts at index.
   php of atemplate, and after some searches i found a code near to what i hope,
   that is it..
 *     ```
       <?php if( is_sticky() ) ?>
       <?php else ?>
       <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
       <?php if( is_sticky() ) ?>
       <?php else ?>
       ```
   
 * the problem is that code only grab last (one) sticky post, and what i looking
   for is to customize it to grab more than one sticky post.
 * Any help will be appreciated.

The topic ‘Need latest 10 sticky posts code’ is closed to new replies.

## Tags

 * [Sticky posts](https://wordpress.org/support/topic-tag/sticky-posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [elking10](https://wordpress.org/support/users/elking10/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/need-latest-10-sticky-posts-code/)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
