Codex

Attention Help us to improve the Codex by filling out our documentation survey!

Function Reference/sticky class


This function has been deprecated. 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 any of these functions instead.

This function has been deprecated in favour of post_class

Contents

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.