I was thinking of not using the wp_postmeta table to tell where a post is sticky or not. Instead, I will use a new table called wp_poststicky to denotes all posts sticky status. Whenever you create a new post, a new row will be created in the wp_poststicky table.
0 will denote normal posts
1 will denote sticky posts
2 will denote announcement post.
Now I need to explain what is the difference between sticky posts and announcements posts.
Currently sticky posts are posts which will appear at the top of the page, I will change that name to be called announcement posts instead.
Now sticky posts will be referred as posts that will only stay on top of all the posts which is posted on the same day as the sticky post. My command of English is not that good, hope you are understand what I mean with the following example:
Announcement
– Post 5 (Announcement Post)
29th March 2007
– Post 6
– Post 7
– Post 8
28th March 2007
– Post 4 (Sticky Post)
– Post 1
– Post 2
– Post 3
As you can see, Post 4 is a sticky post and it will stay on top of all posts that is posted on 28th March 2007 ONLY, posts that are posted after 28th March 2007 (eg. 29th March 2007) will still be on top of the sticky post that is posted on 28th March 2007.
But for Post 5, which is an announcement post, it will stay on top of all posts.
Think of it as a feature in forum softwares in which announcement will appear in all forums and sticky topics will only appear in a particular forum.
This feature will be in the final version of WP-Sticky 1.00. Other features planned for future versions include auto un-announce, auto un-sticky posts after a certain number of days of date.
*UPDATED* 3rd December 2007
Uncle Bubba wrote:
When you login and write/manage a post you’ll see “Post Sticky Status” down in the lower right hand corner. There are three options “Announcement”, “Sticky”, and “None”. Announcement makes a post always on top no matter what. Sticky keeps it at the top of that day’s posts. So, say you made 4 posts on Wednesday and made one sticky, the sticky one would stay on top of Wednesday’s posts. If you then make a post on Thursday it will appear on top of all of Wednesday’s posts but underneath the Announcement post.