WordPress GuidePost → Sticky Posts

WordPress sticky posts: what they are and how to use them

Image

Want to make sure a specific blog post always stays at the top of your site? That’s exactly what sticky posts are for.

WordPress makes it easy to “pin” any post to the top of your blog, no matter when it was published. Whether you’re highlighting an announcement, a popular guide, or a seasonal offer, sticky posts give you an easy way to control what your visitors see first.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

What is a sticky post in WordPress?

A sticky post is a blog post that stays pinned to the top of your blog archive page—even if newer posts have been published. WordPress shows your latest posts in reverse chronological order by default, but sticky posts override that and remain at the top.

Sticky posts are only available for blog posts, not pages or custom post types (unless you customize that behavior with code). They work with most WordPress themes and are ideal for highlighting content that needs extra visibility.

Why use sticky posts?

Sticky posts are great when you want to:

You can also use sticky posts to guide new visitors toward your best or most helpful content, which can improve your bounce rate and keep people engaged longer.

How to make a sticky post in WordPress (block editor)

If you’re using the standard WordPress block editor (Gutenberg), here’s how to pin a post to the top of your blog:

That post will now appear above all other posts on your homepage and blog archive pages.

How to make a sticky post using the classic editor

If you’re using the Classic Editor plugin or an older version of WordPress:

How to find and manage sticky posts

WordPress adds a “Sticky” label next to posts that are pinned when you view Posts > All Posts in your dashboard. That makes it easy to spot which posts are currently sticky.

To unstick a post:

If you make more than one post sticky, WordPress will show all of them at the top in reverse chronological order (most recent first).

How to style sticky posts differently with CSS

Want your sticky posts to stand out visually? WordPress automatically adds a special CSS class—.sticky—to any pinned post. You can use that class to style it with a different background, border, or font.

Here’s an example:

.sticky {
  background-color: #f9f9f9;
  border-left: 4px solid #0073aa;
  padding: 15px;
}

To add custom CSS:

This change only affects how sticky posts appear. It won’t change their position or functionality.

How to create sticky posts programmatically

If you’re comfortable editing code, WordPress offers functions to make posts sticky or remove sticky status. You can add these in your theme’s functions.php file or in a custom plugin.

// Make post with ID 42 sticky
stick_post(42);

// Unstick a post
unstick_post(42);

This is helpful if you want to automatically pin certain types of posts—like ones in a specific category—or if you’re building custom admin features for clients.

Use sticky posts for custom post types

Sticky posts don’t work with custom post types by default. If you want similar behavior for a portfolio, product, or other post type, you’ll need to customize your theme.

You can use custom fields or taxonomies to flag “featured” content, then modify your theme’s query to display them at the top.

Common problems and how to fix them

If your sticky post isn’t working as expected, here are a few common issues:

Smart ways to use sticky posts

Here are a few ideas depending on your site type:

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.