WP-Sticky New Ideas

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:

– 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.

1 Star2 Stars3 Stars4 Stars5 Stars (179 votes, average: 4.00 out of 5)

94 thoughts on “WP-Sticky New Ideas”

  1. Thank you so much.. that information is great and im just teaching some of my work mates how to implement that plugin… love you man
    from Johannesburg, South Africa

  2. what plug-in you used in this comment…? where you can display country and the os and browser?

  3. Pingback: ??? - ??
  4. props gamerz. have recently run into your wp tools and can’t believe the selection and quality. you crank these things out! so thanks. if my blogs ever turn a profit it will in no small part be because of these scripts. donations will follow. 🙂

  5. I’m using two of your plugins, and they work very well. I pulled out my credit card and was all set to donate $5. Then I saw that for some reason you have a minimum of $10. Since I can’t give you the $5, I’ll just say thank you for the great plugins.

  6. Hi, I may have a weird question but I can’t find how this plugin is working… What is the function we call (php get_sticky…) to make the announcement appear exactly where I want it to? I’ve read the readme files, plus all the topics in the forum and I might be dumb but I really don’t get it. I can check the post as a sticky/announcement but it doesn’t appear anywhere in the page since no function is called. And in Options > Sticky I don’t see any way to configure anything. Maybe the solution to this is easy but I’m sorry I really don’t get it. Any help is more than welcome, thanks a lot 🙂

  7. Huh ok… But what if I want the annoucement post to be on the top of the page, way above all the other posts, with a banner in between? So you mean an annoucement will only be on the top of the posts, no way to customise anything from that? So we can’t work with any layout? Your plugin is very cool but wouldn’t it be a good idea to create a function like get_annoucement_post and get_sticky_post we could put exactly where we want them to appear on the page and then define the number on posts to display (and a class) for each function? It could make WP Sticky more flexible. I will use your plugin anyway because it’s great, these are ideas only, since WP Sticky is still in beta version, you care doing something with them ^^

  8. Hi,

    I’m hoping this will do what I’m hoping I need it to do. I want a plugin where I can choose certain posts and sticky them to the homepage so readers can see the hot topics I want them to see.

    Is this going to show at the top of the page or in a side bar?

    Can I choose more than one post to sticky?

    Is there a place to see what it will look like when installed?

    Thank you 🙂

  9. It will show on top of the page and if you are using recent post on the sidebar, it will be on top also.

    Yes you can.

    Check out the Plugin Screenshot link on the right sidebar under Blogroll

  10. GaMerZ, I think what Noryakam meant was this:

    Say you wanted to have an explanation post in the archives of each category. This post could tell you what that category was all about. Having it “stick” at the top of each category would be great.

    This is the type of functionality I would like, to choose between date and category for the stickiness.

  11. Oops, I see now that the category display is already a feature!

    Any way of making that post not show up on the main index page? Also, even with the option to not display date, the date still shows for me, even with the WP default theme.

  12. Unless you do some if else checking.

    The default theme by default did not use the_date() and hence it uses the_time() and the_time() will always show.

  13. Hi, it’s working well. I wanted to remove the “Announcement” that appears at the top of the sticky post. I did it at line 113, right after
    case 2:

    $temp = $before.__(‘Announcement’, ‘wp-sticky’).$after;

    removing Announcement, but leaving the two single quotation marks.
    GaMerZ, let me know if there’s a better way.

  14. it is z good idea,but “posted on the same day”?? the sticky posts?
    i think ,the same weeks,may be batter.

    do you think?

  15. Is it possible to have a different announcement post for each category.

    Lets says I have 3 categories: Jobs, Real Estate, Health
    and I want my visitors to see a different announcement in each of those categories.

    Would I be able to create 3 DIFFERENT announcements and assign them to the respective category, so that visitors will see a different announcement post in each of the 3 categories.

    Or is it that you can only create 1 announcement post that will be desplayed across all categories?


Comments are closed.