A WordPress-centric search engine for devs and theme authors



sticky_class ›

Since2.7.0
Deprecated3.5.0
sticky_class ( $post_id = null )
Parameters:
  • (int) $post_id An optional post ID.
    Required: No
    Default: null
See:
Defined at:
Codex:

Display "sticky" CSS class, if a post is sticky.



Source

function sticky_class( $post_id = null ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'post_class()' );
	if ( is_sticky( $post_id ) )
		echo ' sticky';
}