what are sticky posts in wordpress code example
Example: wordpress show only sticky posts
$sticky = get_option( 'sticky_posts' );
$args = array(
'posts_per_page' => 1,
'post__in' => $sticky,
'ignore_sticky_posts' => 1
);
$query = new WP_Query( $args );
if ( isset( $sticky[0] ) ) {
// insert here your stuff...
}