Earlier this week, I received a following forum notification in my inbox regarding Tag Sticky Post:
I’ve downloaded the plugin Tag Sticky Post that will allow me to stick posts depending on which tag I’m currently browsing in my blog. The tag that will be checked is from the post’s custom_field “tag_sticky_post”. So, if I go inside the post and set post “A” to stick on tag “1”, if I go to http://www.myblog.com/tag/1 the post “A” will be shown on the top with a custom css class (to highlight it). So far so good.
The problem is that the plugin can’t seem to work when I’m browsing archives for 2 tags at the same time, like the example I gave above:
You can view the entire post here.
This prompted an update to the plugin that I’ll discuss in more length in another post, but first note that this particular use case provided a perfect example of the type of enhancement that fit with the vision of the plugin.
So yesterday, I officially released Tag Sticky Post 1.2.
What’s New in Tag Sticky Post?
In this particular version, I introduced the following functionality:
- Introducing support for multiple tags in the querying string. So if your URL contains tag/tag1+tag2+tag3 and a post is tagged in that set, it will be highlighted.
- Added several private helper functions to improve code readability
- Improved the meta data serialization process by refactoring the code
Overall, it’s a relatively small update but it handles the use case of searching a site with multiple tags.
Additionally, I took the opportunity to refactor some of the code to enhance the readability and to incorporate some of the better practices that I’ve learned since I first built the plugin.
Anyway, if you’re interested in checking it out, be sure to visit the plugin’s repository page.