Use is_sticky( $post_id )
to test if a post is a sticky post:
if ( is_sticky() )
echo 'I am sticky!';
if ( is_sticky( 123 ) )
echo 'The post with the ID 123 is sticky!';
Related Posts:
- Exclude sticky post from main query?
- Show Sticky Posts in Category Archive
- Set sticky posts schedule (Automatic)
- Add a single featured post to all pages?
- Display only the most recent sticky post, display other posts in chronological order
- Include sticky posts in ‘Blog pages show at most’ X number of posts?
- Exclude expired sticky posts
- Exclude Sticky posts from Main Query break Pagination
- ignore_sticky_posts in WordPress 3.0.3?
- Exclude Current and Sticky Post
- Front page should display only one category of posts including sticky post with custom featured post box
- Make sticky post on save
- Pin a post to the top of a page, other than the home page
- Why WordPress CMS uses an array in wp_options instead of a field for Sticky posts?
- ignore_sticky_posts not working with word press version 3.9.1
- How to modify query on category pages to show only sticky posts?
- Make posts non-sticky
- Custom query: how to get the sticky posts first?
- I would like to change the sticky posts label “Featured” to something else
- How to display sticky post with custom html
- Update a post to remove sticky option
- Show image if a post is featured
- I do not want my front page sticky post to show up in a category
- How to display a sticky post inside a div?
- WooThemes Mini Features – modify query_posts to display only sticky_posts
- Exclude Sticky Posts as everyone!
- Don’t move sticky posts to the first page
- Latest Sticky Posts with Grid Thumbnails for static front page
- Remove old sticky post on publish
- Limit Number of Sticky Posts to Show
- get_option(‘sticky_posts’) returns stickies that are in trash
- Display latest sticky post or display nothing
- Create thumbs only when a post is sticky or any other way?
- How can I display only sticky posts from a parent category on the homepage?
- Images for sticky posts
- Sticky Posts exceed posts per page limit
- WP_Query: Why is sticky post not first item in loop?
- Query *only* sticky posts
- Show all sticky posts, WITH pagination
- Highlight a Featured Post?
- How to make “sticky” pages (and query by them)
- How do I show sticky posts on a static front page that also contains content?
- Sticky posts on home page, search, tag and archives without plugin
- WordPress 3.1 – How does one add sticky post capabilities to post types
- Include Sticky Post in Page Posts Count?
- wp_query for the first sticky, then display the rest of the posts excluding the first sticky
- Randomly placed sticky custom posts complemented by blog posts
- Get sticky post from category?
- How to make all posts in a category “unsticky”?
- Include Sticky Posts in Page Post Count for custom query
- Query sticky posts with thumbnails
- How to remove sticky post capability for a specific user role?
- How to use custom fields to enable sticky posts on custom post types?
- How to make post sticky in the admin page?
- Ignore sticky posts if post is not in meta query
- How to retrieve “sticky” post outside the “loop”?
- wp_query should show stickies first
- I’d like to cycle through existing posts in a post type, showing one per day ordered by title, and starting over when the last is reached
- Sticky posts not working when a specific category is set
- Include sticky posts on the static page front page
- Sticky posts per category
- How to display only feautured/sticky listings on the homepage
- Difficulty with PHP function that displays a post’s format in WordPress
- Custom loops, sticky posts, and pagination nightmare
- Only display sticky post or latest post in custom loop
- How to get bbpress sticky topics
- How to automate featured posts number? [duplicate]
- Exclude duplicated $sticky post from combined loop content
- Loop for sticky posts
- Check if parent post is sticky on attachment page?
- Exclude current sticky post
- Why: sticky front page code, shows latest non-sticky on logged-in front page
- Can’t get pagination to work for sticky posts only
- Sticky option for custom post types without using custom fields or plugins
- How to display sticky or latest published post on the current category page it belongs to?
- Filtering all posts AND sticky posts through meta_query
- Get all sticky posts from one user through user ID
- Sticky posts don’t show up first in custom loop
- Make posts_per_page value the same on all pages
- marking a post that was sticky on category template
- Custom loop off by one post
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- Display Specific Posts at Start of Loop
- How to display sticky post always at the top (before regular post) in wordpress?
- Staggering featured post using ‘sticky’
- Add to search posts query array with post IDS which will appear first
- Seach and categories not working when ignoring sticky posts in main loop
- Pin to Top Functionality using orderby custom field then event date
- How to display only sticky posts on category pages?
- WP Query with sticky posts and tax_query
- Show sticky blog post on homepage
- Show sticky post before other WP_Query
- How to change text (date) in post base on the day
- Multiple loops on index page with sticky post and pagination
- Multiple loops with / without sticky posts and different post limits
- How can I display sticky posts at first in wp_query?
- Pagination not working only on Archive-Name.php using new WP_Query
- I make sticky post for my archive page for custom post type with ACF field and loop is not working
- Why ignore_sticky_posts argument is in sticky post query?