Category Sticky Post

Category Sticky Post for WordPress is a plugin that allows you to mark a post as sticky within a specific category archive. It works exactly like the typical sticky post functionality within WordPress, except that it’s specifically for category archives.

This means that if you have a set of articles under one category, you can mark one to always appear at the top of the category archive.

I’ve written and released a similar plugin – Tag Sticky Post – which came out of a need for my own site. But we all use categories and tags differently. As such, I wanted to make sure that I covered both types of archives.

The problem that the plugin attempts to solve is the same as that of Tag Sticky Post. Directly from that project’s post:

The problem is that I often write a post introducing the project, what it does, why I wrote it, and where you can find more information about it. But over time, I write posts that cover various updates or other issues about the project ultimately pushing the introductory post – arguably the most important post – lower into the archive.

Category Sticky Post has the following set of features:

  • Allows you to select which category in which to stick a post
  • Will display the post on the top of the first page of the archive just like built-in sticky posts
  • Will only allow you to stick a single post per category
  • Displays whether or not a post is stuck in a category on the Post Edit dashboard
  • Provides light styling that should look good in most themes
  • Is available on each post editor page
  • Is fully localized and ready for translation
  • Includes Spanish translations right out of the box (thanks to Andrew Kurtis!)

Be sure to check out a variety of screenshots, too.

Thanks to FirstSiteGuide for providing a set of translations for the plugin, as well. They focus on building an online presence and have written a couple of guides related to WordPress, as well.

For the plugin, you can install it from the WordPress Dashboard or download it from the plugin’s homepage.

Category:
Projects
Tags:

Join the conversation! 122 Comments

  1. This plugin is exactly what I was looking for, but it doesn’t seem to be working for me…. I have defined what category the post should be in, and assigned the sticky post to that same category, but all of my sticky posts are showing at the top of all the categories. Is there a certain way I need to be calling for the Sticky Post in the category.php file that perhaps I am missing? Thanks!

  2. This works great, and is exactly what I need.

    Yet, the post seems to be too wide for my site? Is there a way to adjust the width?

    http://churchletters.org/category/free-sample-church-letters

    It’s the post at the top that says “Free Letters” – As you can see the border of the post doesn’t line up with the others…

    Thanks,
    Norm

  3. Great plugin, it was exactly what I was looking for! Thank you!

  4. Hi
    Thank you for this plugin.
    I have a question : All the categories are not displayed in the list. is there any maximum number ?
    Thank you !

  5. The category sticky is working for me with one problem. It is sticking the post to the top of my home page as well as the category I specified. I checked and the box is not checked for regular sticky posts. Help.

  6. Hi Tom, We’re doing ‘Category Podcasting’ with WordPress, and I’m just wondering if I use this to make a post sticky, what will it do to the RSS feed, will it always make the top item in the feed the sticky one? However I don’t want this, I want the top sticky simply for information about what the podcast is about for this particular podcast series.

  7. Love the plugin, but i’m having the same problem with overlap. I removed the margins from plugin.css, but it is still there. Any ideas?

  8. Is there a way to increase the number of post that can be “sticky post”?? Instead of just one can I increase it to 5? 10?

    If so you would be my super hero man.

  9. Hi, this plugin works almost perfectly. If I change the product and store the specified sticky category is deleted. So I need to save again after the item category and specify save the sticky.

    Is that intentional?

    Thank you
    Jochen

  10. Hi Tom

    This plugin was exactly what I need, so I installed it and it worked as described. The only trouble is that my menu items in the menu admin page became “frozen” ie they can’t be pulled up and down and no dropdown menu items can be added. This happened on three themes I tried, Slide, twenty-twelve and Suffusion. Is there a workaround please, as I would like the functionality of your plugin.

    Thanks
    Vic

    • Hey Vic,

      This sounds like it may have to do with another plugin as Category Sticky POst was tested with Twenty Eleven, Twenty Twelve, and Standard during development. There’s also only CSS changes that have been made – no JavaScript that would interfere with a menu.

      This is also the first report I’ve had of this. If disabling all the plugins doesn’t fix the problem, please send me an email.

  11. I’ve noticed that it won’t apply the custom ‘category-sticky’ class to the post if the post is assigned multiple categories. For example, I have it set to CategoryA and Featured (which displays the post on the homepage), and have it stickied in CategoryA. The stickiness works fine, but it doesn’t apply the ‘category-sticky’ class, so I can’t do any custom styling. If I remove the Featured category, it works, but then won’t display on my homepage. Any ideas?

    • Hey Michelle,

      Thanks for the heads up – I’ll make a note of this and see if I can’t introduce a fix for a future release.

      • hi tom
        i seem to have the same problem as michelle. on the page mentioned above i classified the second post (“philosophische reisen”, the explanatory main post for this category, also categorized in this category) as a sticky post for the category “philosophische reisen” but it’s still listed chronologically because it’s also categorized in another category. i need this other category in order to exclude/hide the post from the regular posts listing on the front page. any solution?

    • The problem with the class category-sticky still exists. There is no css styling possible!

      • Sorry, I don’t understand your comment. Do you mean the class still exists after the plugin is de-activated or what? Let me know (and provide a link so I can take a look, as well).

  12. is there a way to have more lines of the sticky post content show on the category page before the “read more” link appears? but not have the other posts affected?

  13. Great plugin, it does almost EXACTLY what I need.

    Is is possible to stick more than one post to the top of the category archive?

  14. What a great article, helped me a lot, Thanks for sharing.

  15. Awesome plugin. The only quirk is that the category sticky posts are appearing on the homepage under recent posts. Is there a way to keep the sticks solely on the category page?

    • They shouldn’t be appearing on the homepage – this could be a problem with your theme or another plugin.

      I typically don’t offer free support, but if you’d like me to take a look at it and provide a resolution, then feel free to contact me and let’s see what we can do!

  16. Hi Tom,

    I’m having an issue. Whatever post I make sticky lays on top of the default “latest” post, so it’s like they’re fighting for the same spot.

    I’m sure it has something to do with a conflict with my theme, but can you lead me in the right direction so I have an idea of how to fix this?

  17. Does this plugin still work? I cannot get it to work for me at all. Perhaps my theme is blocking it?

  18. Hi Tom

    Does your plugin work for ver 3.6 ?

  19. Hi,
    this is exactly what I need however, after I installed, I can no longer add new photos to previous posts or update posting dates on previous posts. Any ideas?

    • This sounds like a conflict with another plugin or your theme – this is the first I’ve heard of the issue.

      If you can email me the details of your environment, I’ll make a note. Also, just a heads up, since this is a free plugin, I’m only able to address issues as soon as I get a chance.

  20. Hi there,

    How can I delete the black border around the sticky post – http://www.santamonicahotelbooking.com/category/abbot-kinney-blvd/

    Thanks!
    Charlotte

  21. Hello,
    I really like this plugin but I have a quick question for you. Do you think it is possible to increase the amount of sticky posts that I can display on a category from 1 post to 4 post? That would be amazing if you let me know what I have to do in order to do this.

    Thank you for this amazing plugin and I will wait for your reply.

  22. I really liked the sticky catogery plugin from you, are there any plugins from you to make the widgets sticky ?

  23. o plugin foi instalado mas na hora de escolher a categoria não aparece nenhuma oque fazer? porque ele não le as categorias?

  24. Hi,
    I have one problem. I need more post at top of category. It means i need more sticky posts for one category. How i can change it?
    Sorry for my bad English.

  25. Hi Tom,
    This plugin is just what I wanted for my About section, so thank you! But I can’t seem to get rid of the heavy black border at the top. I’ve tried overriding the CSS in my child theme but it’s not working. Of course I did check the box that says hide border. It doesn’t show up on the individual post, but does on the category page. Can you please help me? I’m not a code pro, obviously, just a lowly artist, so feel free to talk down to me! :-D
    Leah
    p.s. Here’s what I tried to do in my child theme:
    media=”all”
    .category-sticky {
    border-top: none;
    border-bottom: none;
    }

  26. Hey there this is kind of of off topic but I was wanting to
    know if blogs use WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience.
    Any help would be enormously appreciated!

    My web site :: comptoir en quartz Quebec

  27. The category plugin installs easily and my site thinks everything is ok. No unexpected flareups of what the heck… is going on.

  28. Hi,
    I have a problem with that plugin. When it is activated I can’t edit menu structure. I only can add new item at the end of menu, and it’s not possible to move it anywhere. Links for moving does not work, drag and drop does not work either. I use WordPress 3.9.2

    • Hey Majki,

      This sounds like it’s a problem with a conflict of something else thats running alongside the plugin. It could be something in the theme or it could be something in another plugin.

      Without knowing more, there’s not much I can do.

  29. Hi Tom,
    I have been using your sticky category widget for just over a year and it’s been great. However, I had a problem with the last set of revisions I made and two things happened (not sure if they’re related). First, the menus blew up (not your widget’s fault – that’s just the first symptom), so that a bunch disappeared and I’ve had to rebuild them. Second, most of the categories are grayed out from the list when I try to select them from the list to make a post category sticky.

    The list appears to be generating correctly, and the two new categories I created today area available, but most of the existing categories (including parents and subs) are not available. Any suggestions where to look? Many thanks.

  30. I use the plug-in and really enjoy it, however, I’m wondering if there is a way to make one post sticky in ALL categories I have? Basically, my post is instructions on using the site.

    Here’s what I have for a sticky post in one category, however, I would like to have those instructions at the top of each category.

    http://churchletters.org/category/recent-updates

    Thanks!

  31. This works like a charm except for one thing — with sub or “child” categories, all the sticky posts associated with that category show up… in my case for a client site I have a “healthy foods” category with a variety of sub-categories like “healthy olive oil” “healthy dairy” etc. On the parent category “Healthy Foods” I get all the child category sticky posts. Am surprised not to see this question asked already — so maybe I’m missing something. Hope it’s an easy answer as this is a great plugin!

  32. I wonder how to add (hopefully with a plugin or theme function) the category to the top of any related post? Thank you.

  33. Hi Tom

    congratulations for your plugin …

    I have two questions for you:

    I can only select one post as stickhy for each category?

    the post selected as stickhy is visible twice (at the top and at the original position) … you can see it only at the top?

    Thanks

    • Thanks!

      I can only select one post as stickhy for each category?

      Yes. One sticky post per category

      the post selected as stickhy is visible twice (at the top and at the original position) … you can see it only at the top?

      Only at the top.

  34. Hi,

    Thanks for the plugin! I have a couple of questions, though.

    – On admin-side article listing it displays a ‘0’ after the title if the article is not set as a Category Sticky Post. This is a bit annoying…

    – I cannot get translations to work. I’ve made the translations using Poedit and placed the files in /lang under the plugin. Filename fi.po matches my language settings in config.php.

    Any ideas? Thanks.

    • – On admin-side article listing it displays a ‘0’ after the title if the article is not set as a Category Sticky Post. This is a bit annoying…

      I hate to say it, but I’m not sure why this is happening. This is the first report that I’ve had with this particular issue.

      Do you also see it when you swap themes?

      – I cannot get translations to work. I’ve made the translations using Poedit and placed the files in /lang under the plugin. Filename fi.po matches my language settings in config.php

      IIRC, the format of the filename needs to be en_US.mo, for example. Try that format and let me know.

  35. Tom,

    I’m working on a site for a client and she is desperate to have the sticky post work on the home page. I’ve looked at the plugin code, and even tried to edit it, but it didn’t seem to do what I had hoped. Basically I just need the class to show up on any page, not just category pages. But specifically the home page.

    Any help you can provide would be greatly appreciated!

    • Hey Glenn,

      Unfortunately, this is more in the realm of a customization for the plugin that’s not really possible for me to offer via blog comments. Remember that WordPress offers the native functionality to create a ‘Sticky Post’ for any post and have it stick to the homepage.

      IIRC, it even supports custom class names so that may be the better route to go.

      Hope this helps!

  36. Your app was working perfectly for me previously. I have had it installed for quite some time and about 2 months ago it seems to have stopped working.

    I have the category selected but it simply appears in the chronological position and not at the top (not sticky).

    My theme has not changed.

    Can you help?

    • Hey Tim,

      Unfortunately, without knowing more information or taking a look at how it’s interacting with the theme, I’m afraid there’s not much help I can provide here.

  37. Tom McFarlin | You’re subscribed to discussion of Category Sticky Post For WordPressTom – What info can I provide you to look into it? Can I email it directly to you?

  38. Hi Tom,

    I’m looking for a plugin to get post to be sticky, but based on their post_type or category. Look like this Category Sticky is already close enough, but not quite 100% yet. Is there another one that you know suite my need?

    Thanks.

  39. Hi, your great plug has been working well for a long time, but since a few time there is a big problem: Post editor can not be opened, it go slowly to 520 error.

    My web site is running with WP 3.9.5 and have 3.600 categories. Do this high number of categories make a problem for your plugin? Thanks

    • Have you tried disabling the plugin?

      There’s nothing in the plugin that should be causing that problem, but if you’re dealing with over 3k categories, I can’t promise than it’s not choking at some point. 

      If your installation works after disabling the plugin, let me know and I’ll look into seeing about making the plugin more performant.

  40. Hi, and thanks fot your quick answering;

    Yes, I disabled your plugin and all others, one by one, to localize the problem.

    Installation works after disabling category sticky post
    Installation does not work with only category sticky post activated

    Thanks

  41. I installed this plugin and for some reason, it doesn’t list all available categories. Even the default “Uncategorized” category is MIA.

    • Hey Shane,

      Sorry to hear that! Unfortunately, the problem could be attributed to any number of issues – the theme, another plugin, etc. – I’d recommend trying it with the default theme first and seeing if the problem persists. I’d also recommend trying it with deactivating plugins and then re-activating them one-by-one to see if the problem persists.

      I’m planning to work on this plugin soon (as time permits) so there will be an update coming sooner rather than later (at least that’s the plan!).

      Hope this helps!

  42. Hi Tom,

    Your plugins is exactly what I’m looking for but unfortunately I can only get it to work when I disable another plugin I rely on: Ultimate Category Excluder. Do you have any suggestions for them to peacefully coexist? ;-)

    Sjoerd

  43. Hi

    When using the plugin I have problems I hope you can help me with.

    The sticky post for a category is shown only in the first page. In the inner pages (using the pagination) I get different sticky post – which displays twice – On top and as the first one in the list. How can I set the category sticky post to display as the only sticky post?
    The excerpt that is not part of the post in inner pages. How do I add it to use the post text automatically?
    How do I change the sticky post from item to another so I won’t have a category without a sticky post when I disable the previous sticky post?

    Thanks

    Rani

    • The sticky post for a category is shown only in the first page. In the inner pages (using the pagination) I get different sticky post – which displays twice – On top and as the first one in the list. How can I set the category sticky post to display as the only sticky post?

      This isn’t a problem that I’ve encountered before and it may be an issue with your theme or another plugin.

      I’d recommend reverting to the default theme and/or disabling other plugins to see if it fixes the problem. If not, let me know.

      How do I change the sticky post from item to another so I won’t have a category without a sticky post when I disable the previous sticky post?

      This is in the dashboard in a metabox on the right-hand side of the screen. You can opt to choose to make a given post the sticky post of a category and it’ll override whatever else is set.

  44. Hi

    I’m using Genesis.

    The code for the title is:

    add_action( ‘genesis_before’, ‘genesis_do_post_title’, 18 );

    add_action( ‘genesis_before’, ‘feature_excerpt’, 19 );

    I assumed it should be the same content in all the inner pages, but it changes for each page in the category.

    Any idea why?

    • I assumed it should be the same content in all the inner pages, but it changes for each page in the category.

      I don’t use Genesis, but based on what you’re sharing, it looks like you’re trying to add a specific action for displaying the title and the feature excerpt for a given post.

      Other than that, I don’t really understand what you’re asking me.

  45. Sorry.

    The code is for the category.php

    I’m trying to display the featured sticky post on all category pages.

    I’m using inside the function:

    function feature_excerpt() {

    $length = 30;

    echo ‘

    ‘ . wp_trim_words( get_the_excerpt(), $length ) . ‘

    ‘;

    }
    I want to display the same sticky category post in every category page (1,2,3,4…)

  46. Hi Tom, thanks for your work.

    I’d like to remove all meta tags from the (category) sticky posts ONLY. Can it be done by modifying the code of your plugin? If yes, could you please help? I’m a css/php beginner.

    • Heya,

      By meta tags, I’m guessing you mean the class attribute values on the HTML element. This isn’t something the plugin can do on its own as some of it is left up to the theme.

      Though it can be done, I don’t think this is something that I’d advise a beginner to attempt as it could lead to a completely broken theme if something is missed or improperly removed.

  47. Hi Tom, your awesome plugin is exactly what I needed for my site. I have a question. Is it possible that only admins be authorized to change the sticky posts? I cannot permit my subscribers, authors and editors to kick my sticky posts out from the top row…

    • Is it possible that only admins be authorized to change the sticky posts? I cannot permit my subscribers, authors and editors to kick my sticky posts out from the top row…

      This isn’t possible without modifying the plugin – it would need to have some additional code written in order to support this.

  48. Tom,

    Is it possible to have multiple sticky posts per category?

    If so, how would our developers make that change?

    Thanks,

    Josh

    • Is it possible to have multiple sticky posts per category?

      As the plugin stands right now, it’s not. Ultimately, that would defeat the purpose of having a sticky post. The functionality is built around the same idea as a standard WordPress Sticky Post where you can stick a single post to the top of a category archive page.

      If so, how would our developers make that change?

      This would depend on a number of different things:

      1. The UI would need to allow multiple posts to be selected
      2. The posts in the UI would need to be ordered
      3. The query on the archive page would need to retrieve those posts and place them at the top of the query
      4. The code would need to remove those posts from their standard place in the query.

      Hope this helps!

  49. dear. Tom

    help pls

    the problem is I have 150 categories

    drop down the “Category Sticky” appears only 72 categories (out of 150)

    this limitation? it can be corrected? please help

    • This isn’t something that I can help with on my blog, unfortunately. It’d have to be done as a support request (which isn’t yet available for my free plugins).

      Keep an eye on the blog for when I begin to offer this type of service.

      Thanks Yury – I wish I could be more help.

  50. Hi, Tom

    I want this plugin features in my website so bad.But this plugin doesn’t seem to work for me it just adds the border but is not sticky on the category archive page.I’m currently using it on my PC localhost but I have also tested it on web server with the same theme.The theme I’m using is http://themeforest.net/item/valenti-wordpress-hd-review-magazine-news-theme/5888961

    • Unfortunately, this is likely to do with the theme.

      The best advice I can give is to try it out using Twentysixteen or one of the default themes on localhost and see if it works. If so, then it’s the theme; otherwise, it’s a bug in the plugin.

      I don’t really offer support for my free plugins, but I do currently have something in the works where there’s a big upgrade and an option for support for this particular plugin (and its companion plugin, Tag Sticky Post) coming sometime soon.

      So your timing is pretty spot on. Please follow-up with me here (or via email on my contact page) and we’ll go from there!

  51. Hi Tom!

    Thank you for you excellent job. Your plugin is very useful.

    However, I have a big necessity in sticking the post on the “CATEGORY TOP POSTS” which is on my mainpage and reflects all recently added posts. The latest post is on the top.

    I am ready cover the fees.

  52. Hi Tom,

    your plugin ist great, that’s what my theme needs. But I have a little problem, hope you will help me. :) I need to have the latest post after all the existing sticky post, not on the top of them. I tryed to configure your script to

    //loop over posts and relocate stickies to the front

    for( $i = $num_posts; $i>0; $i++){

    if( in_array( $posts[$i]->ID, $sticky_posts ) ){

    $sticky_post = $posts[$i];

    //remove sticky post from current position

    array_splice( $posts, $i, 1 );

    //move to front, after other stickies

    array_splice( $posts, $sticky_offset, 0, array( $sticky_post ) );

    //increment the sticky offset. the next sticky will be placed at this offset.

    $sticky_offset–;

    //remove post from sticky posts array

    $offset = array_search( $sticky_post->ID, $sticky_posts );

    unset( $sticky_posts[$offset] );

    }

    }

    but this doesn’t work, I’m afraid I’m not a programmer. For you it’s surely a litte thing.

    It would be gorgeous if you would help me! Please.

    Yours, Fritz

    • Hey Fritz — thanks so much for this comment. Unfortunately, I don’t offer support for this plugin via comments on this blog. I have a plan to eventually re-write this particular plugin by next year but what you’re asking is something that I can’t really do outside of contract work via Pressware.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.