Languages: English • 日本語 Русский • (Add your language)
This Conditional Tag checks if the current post is a Sticky Post meaning the "Stick this post to the front page" check box has been checked for the post. This is a boolean function, meaning it returns either TRUE or FALSE.
<?php is_sticky($post_ID); ?>
is_sticky(); // When any Sticky Post page is being displayed. is_sticky('17'); // When Sticky Post 17 (ID) is being displayed.
By using if condition we can displays like below
if ( is_sticky() ) { // Sticky post content } else { // normal post content }
Since: 2.7.0
is_sticky() is located in wp-includes/post.php
.