How to Make WordPress Sticky Posts

written by:
posted on: December 3, 2018

WordPress Sticky Posts is a feature places a post at the top of the front page of posts, keeping it there even after new posts are published. If you have a specific blog post that you want to feature more predominately, you can mark the post as sticky. This feature is particularly useful if you have a theme that does not have a specific call out section above the fold.

When should you use sticky posts?

If you have a post that you want to drive more traffic to compared to other more recently published posts, you can make it sticky. For example, if you have a sponsored post, giveaway, or particularly viral post, making it sticky will push it to the top of your blog feed on your website. Since most website visitors do not scroll down, a sticky post is a great way to drive as much traffic to a specific post as possible.

How often should you use sticky posts?

Sticky posts should only be used for one or two posts on the blog unless the theme design requires it to be used more frequently. It should not be used for every post. When you uncheck the Sticky option, the post moves back to its place in chronological order.

How do you make sticky posts in WordPress?

You can make posts sticky, using one of two methods – post editor and quick edit.

The individual post editor method is ideal for individual posts you want to make sticky one at a time.

  1. In your WordPress dashboard, go into the individual post edit page.
  2. In the Publish toggle, select Edit next to the Visibility field
  3. Select Stick this post to the front page.
  4. Press Update or Publish when you are ready to save your changes.

The quick edit method works best if you want to make a group of published posts sticky at the same time.

  1. In your WordPress dashboard, go to All Posts under the Posts tab.
  2. Select the checkbox next to the post you want to make sticky.
  3. In the Bulk Actions drop-down, select Edit. Press Apply.
  4. A new toggle will open. Off to the right, you will see Sticky drop-down selection. Select Sticky.
  5. Press Update. The selected posts are now sticky.

You can also watch this video tutorial to show you both methods:

How to style sticky posts?

It’s very easy to style sticky posts, and the options are endless, really. Most themes use post_class() function to add automatic post classes to each post. When you mark your post sticky, a “sticky” class will be added to your post, like this:

<article id="post-12" class="post-12 post type-post sticky hentry">

If your theme is not adding the sticky class to the post container, you can add it yourself by adding the post_class() function to a div or article container. In the specific php file, it will look something like this:

<article id="post-<?php the_ID(); ?>"<?php post_class(); ?>>

You can then add whatever css styling or formatting that you want to add.

How can you hide sticky posts from the WordPress loop?

By default, WordPress displays your sticky post at the top of all of your WordPress posts but also where it is located chronologically. If the post you make sticky is showing up twice on your homepage, you want to avoid that (poor user experience and SEO). Using the ignore_sticky_posts argument, you can avoid this situation:

$args = array(
'posts_per_page' => 10, // or whatever number of posts you want to show per page.
'ignore_sticky_posts' => 1
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();

Do you have any questions about WordPress Sticky Posts? I’d love to hear your feedback! If you are interested in learning more about WordPress, make sure to subscribe to my WordPress newsletter here!

How to Make Sticky Posts in WordPress

Editor's Note

Some of the links included throughout this website are affiliate links, which means that Lindsay Humes LLC receives a small commission when certain items are purchased. These affiliate links provide a means for the site to earn revenue and generate free content for readers. For more details, read the privacy policy here.

Blog Design Lindsay Humes
Meet The Author: Lindsay Humes

Leave a Comment

Your email address will not be published. Required fields are marked *

Join The Blog Better Audit!

Subscribe to join thousands of other creatives, bloggers, and freelancers and receive my free email course on how you can improve your WordPress website. My newsletter is full of tips on how you can grow your audience with actionable exercises that do not require a designer or developer!