I made this plugin to resolve a pretty specific problem – I only want one sticky post to show up on my site at any one time. I publish a bunch of links to other sites, which means that any posts that I write are quickly lost in the flow. Making a post sticky resolves this issue, as my writing will stay at the top of the home page, but it also means that I have to manually edit older posts to remove the sticky flag, if I don’t want to have multiple posts show up at once. So, this plugin ensures that there is only one sticky post published to the site, but does so in a way that doesn’t impact scheduled posts that may have the sticky flag set.
- Download the plugin from the WordPress Plugin Directory
- Extract the single-sticky/ folder file to /wp-content/plugins/
- Activate the plugin at your blog’s Admin -> Plugins screen
- Publish a new post that is marked as being sticky.
- I adapted code initially found here; thanks to Craige for posting it! Also, Devin Price was immensely helpful as I knocked out a couple of issues regarding scheduled sticky posts.
- The first time you publish a sticky post after enabling this plugin, any and *all* other sticky posts will be changed to not-sticky. There is not a way to automatically reverse this decision, nor is their a log of which posts were changed.
- This plugin has not been tested with versions of WordPress prior to 4.0.
- Do not use this plugin if you are using another to manage per-category sticky posts. It has not been tested with that setup, and it will most likely mark all of those posts as non-sticky.
Frequently Asked Questions
How does the plugin treat scheduled posts?
If you have a sticky post visible on the site and you schedule a new sticky post, the old one will stay sticky until the new one is published and visible on the site.
How does this work with plugins that set sticky posts per category?
Sorry, the short answer is “I don’t know”, as I haven’t tested it with any of those plugins. My expectation is that all of those sticky posts will be set to non-sticky the first time a new sticky post is published after this plugin is activated. I recommend you avoid this situation, but if you decide to try it, I’d love to hear the results.
0.9 – February 8, 2015
- Initial public release.