WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/sticky class


This function has been deprecated since Version 3.5. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use post_class instead.

Description

Displays the Sticky Posts class on a post if applicable. This tag must be within The Loop.

Usage

 <?php sticky_class(); ?> 

Parameters

This tag has no parameters.

Examples

Default Usage

<div class="post<?php sticky_class(); ?>" id="post-<?php the_ID(); ?>">

Sticky Post Identifier

Provides a sticky class to each post that it applies to:

Change Log

Related

See also index of Function Reference and index of Template Tags.