Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Add Sticky Posts for Categories in WordPress

Last updated on by
Follow WPBeginner on YouTube
How to Add Sticky Posts for Categories in WordPress

Sticky posts allow you to add featured posts in WordPress and display them differently on your site’s homepage. Recently one of our users asked us how they can add sticky posts in category pages. By adding sticky posts on category pages you can display featured posts from that particular category. In this article, you will get to learn how to add sticky posts for categories in WordPress.

A sticky post on a category page

First thing you need to do is install and activate Category Sticky Post. There are no special settings page for the plugin. Simply create a new post or edit an existing one, and you will be able to see a new ‘Category Sticky’ meta box in the post edit area.

Making a post sticky in a category

Next, simply choose the category where you want this post to be displayed as a sticky post and save your changes.

If you want to set another sticky post in that category, then you will have to uncheck category from the earlier sticky post. It is not required for a post to be filed in the same category. For example a post filed in Announcements category, can be made sticky in the News category.

Each category can only have one sticky post at a given time. Also each post can only be sticky for one category.

By default the plugin adds a black border on top and bottom of the category sticky post to distinguish it from other posts. You can disable it by checking the Hide Sticky Post Border checkbox. When this box is not checked the plugin adds a category-sticky class to the category sticky post. You can override this in your child theme’s stylesheet.

.category-sticky { 
border:none;
background-color:#f5f5f5;
} 

We hope this article helped you add sticky posts to your WordPress categories. For questions and feedback you can leave us a comment or join us on Twitter.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Clodagh Phelan

    Please could someone give me a simple explanation of the difference between stickys and featured posts. Many tutorial sites seem to use the words as if they were interchangeable but it seems they are not – they obviously have different functions, otherwise why give them different names. Thanks

    • http://www.wpbeginner.com/ WPBeginner Support

      Clodagh, Sticky posts are sometimes referred as featured posts. Some WordPress themes or tutorials would want you to create a category called Featured Posts on your site and use posts in that category to be highlighted as featured posts.

  • Tim

    Found this plugin that solves my problem. Works. Beautiful! http://wordpress.org/plugins/category-sticky-posts/

  • Tim

    The big question is: Why can’t a sticky post just be sticky everywhere?

    Eg what if a post is in multiple categories? (eg an art exhibition with live music and wine tasting should go in all three categories, and be sticky in all three if it’s happening this week).

    I’m guessing the reason is you can’t have multiple sticky posts per category. But… why? If there are multiple sticky posts, just put _them_ in date order, above the other posts.

    Feels like this would simplify things a bit.

  • Wordpress Awards

    well done :) Thanks

  • rakesh kumar

    Very useful information you have shared with us. I was just trying to figure it out how to do this for each category and suddenly found your article, Thanks a lot.

  • Olivia

    What is a sticky post? What does it look like when I see it? Why do i need it?

    • http://www.wpbeginner.com/ WPBeginner Support

      Olivia, see the screenshot in the article. A Sticky post is much like a featured post, it is usually displayed on top of your regular post no matter when it was published.

  • Ali

    Thank you for this article!
    I have been thinking about categories and archives lately because I’m starting to get more posts on my site.
    The sticky posts looks like a great way to showcase one post.

    How do I set up my site so that if someone clicks on a category (or an archive date) they see only a short stub of ALL posts under that category or date?

    Maybe even a list of all post titles if it’s not possible to have a title and intro?

    Currently when I click on a category or archive date all of the posts show, but they show as full posts – so it’s a LONG page and hard to find the one post you want to read.

    Thank you!

    Ali Jayne
    http://alijayne.com

    • http://www.wpbeginner.com/ WPBeginner Support

      Ali you should replace the_content() tag with the_excerpt() in your archive templates like archive.php, category.php, tag.php, etc. For more on this please check out Full Post vs Summary (Excerpt) in your WordPress Archive Pages.