is_sticky ( $post_id = 0 )
- (int) post_id Optional. Post ID. Default is ID of the global $post.
- (bool) Whether post is sticky.
- Introduced in WordPress: 2.7.0
- Deprecated in WordPress: —
Determines whether a post is sticky.Sticky posts should remain at the top of The Loop. If the post ID is not
given, then The Loop ID for the current post will be used.
For more information on this and similar theme functions, check out
the [Conditional Tags](https://developer.wordpress.org/themes/basics/conditional-tags/) article in the Theme Developer Handbook.