Home > MySQL, PHP, Wordpress > Small Wordpress Sticky Plugin

Small Wordpress Sticky Plugin

October 18th, 2009

Hi,
we need a WP plugin that will let expand the “Sticky” function.

Now WP save in wp_options table (option name “sticky_posts”) a serialized array of the posts’ IDs that are sticky.
We would like to also save another value to be associated with the ID, the weight: a number from 1 to 15.
That value could be put, for compatibility, in another row (option name “sticky_posts_weight”?) of that table “wp_options”.

So we need:
- a select (from 1 to 15) to be put in the New/Edit Post, and in the Quick Edit box (hint: quick_edit_custom_box hook).

- an admin page where we can see the posts’ titles with their weight and where we can modify the value, using the select.

- a is_sticky_weight($id, $weight) function that will return true in case of that $id has that $weight.


Small Wordpress Sticky Plugin