Vishal Monpara's Blog
Knowledge.ToString()

Blog  | Poem  | Article

WordPress Sticky Post Plugin


Sticky Post Plugin is a must have plugin in your WordPress arsenal. This plugin shows the designated post on the top of every post. There is no need to modify your current theme.

 

Download WordPress Sticky Post Plugin

 

Version Supported

WordPress 2.1 and greater
WordPress Mu 1.1 and greater

 

Installtion Procedure:

1) Download the plugin and unzip it
2) Put the StickyPost.php file into your wp-content/plugins/ directory
3) Go to the Plugins page in your WordPress Administration area and click "Activate" for Sticky Post
So easy hmmm.......

 

How to stick your post?

It is even simpler than installing your plugin. Choose the victim post to stick on the top and add custom field Key=STICKY and Value=1, press Add Custom Field button, save the post and you are done!!!.

 

Known Issue

If your sticky post is very latest and comes on the front page of your blog, it will be repeated. (This post will be shown as a sticky post and as a regular post)

 

FAQ's

1) I activated plugin but cannot see sticky post.
Check your wordpress version. It must be WP 2.1 or greater or WPMU 1.1 or greater. Second you check the custom field name and make sure that you spelled it correct.

2) I would like to activate Yearly/Monthly/Weekly Repeater Plugin as well
Dont do that mistake. It is going to throw mysql error.

3) I got wierd mysql error
This plugin changes query for showing posts. It is possible that you have another plugin which also modifies the query and hence the resultant query is a junk query which MySQL is not recognizing. so now you have to deactivate any one of the plugins.

Posted On: 04/05/2007 04:01


Feedback

67 comments has been posted.

Travis @  04/06/2007 11:43

Can you explain the difference between this plugin and the Adhesive plugin? It seems like Adhesive is doing the same thing, but without the use of custom fields. Is there an advantage to your plugin over Adhesive?

Vishal Monpara @  04/06/2007 11:59

Advantage: Less MySQL queries + Less php code execution => faster page loading. I think this reason is good enough to use this plugin.

Moreover Adhesive is definitely using custom field. When we are marking the post as sticky, it sets the custom field.

enrico @  04/11/2007 03:55

like adhesive also this plugin have a bad problem of compatibility with wordpress 2.1.2 and up versions, when i activate this plugin, also if i don't sticky any post, in the webpage the link of the next and previous entries disappear. please can you modify the plugin to delete this big problem?
thaks in advice!

Ivan @  04/15/2007 05:21

How to stick your post? I don't understand.Give me an example for sticky a post,pls.Thank.

Vishal Monpara @  04/15/2007 11:17

Enrico,

Thanks for feedback. That problem is solved.

Ivan,

Whatever post you want to stick, go to edit page for editing that post. At the bottom, you will see Custom Field, in Key value type STICKY and in Value field type 1, then press Add Custom Field button and save your post. Now that post will be on the top of every post when you visit your blog front page.

Robert Richard @  04/17/2007 07:18

Hello,

How can I get more than one sticky on home page? Tried value=2, it did not work. I am capable getting 1 sticky on home page.

Thanks for support.

Robert
Canada.

Vishal Monpara @  04/17/2007 09:23

Robert,

Sticky Post supports only one sticky post on home page.

Lynda @  05/01/2007 04:55

Greetings Vishal,
thanks for this plug in and after I loaded and activated it I still wasn't able to make it work. I did as you recommend (in the custom field Key=STICKY, Value=1) but it's still isn't working. Can you take a look? The WP blog is part of the overall site, Delight.com

best,
Lynda Keeler

Lynda @  05/01/2007 05:32

Greetings Vishal,
thanks for this plug in and after I loaded and activated it I still wasn't able to make it work. I did as you recommend (in the custom field Key=STICKY, Value=1) but it's still isn't working. Can you take a look? The WP blog is part of the overall site, Delight.com

best,
Lynda Keeler

Vishal Monpara @  05/02/2007 09:22

Lynda,

This plugin requires WP 2.1(not even 2.0) or greater version. Make sure that you have latest version.

sinouq @  05/07/2007 12:31

my sticky post is shown twice in front page.
How do I fix it ? Please help me..

thanks before,
sinouq

Robertc @  05/08/2007 12:58

Vishal

Good Day. I'm running wp 2.13 have activated your plugin, picked a post added a field Key=STICKY (all caps) and Value=1 and still no sticky post. Can you help, Do you have any ideas what to do?

btw it's a great idea for a post and I can't wait to get it working.

Regards,

Robert

Jim Bass @  05/11/2007 05:07

Very strange -- after adding your plugin, the text style changed to italic all through the site, but only in IE.

In Firefox, it only italicized the sticky post content.

Jim Bass @  05/11/2007 05:13

I deleted it, tried again, and the problem was gone. Thanks.

Vishal Monpara @  05/11/2007 05:14

I checked your blog and it is showing perfectly in IE6, FF 1.5. You may try to change your theme.

filipinoprogrammer @  05/12/2007 06:14

cool thanks for this, i will try it out on my blog

Andrea @  06/06/2007 08:19

The plugin works perfectly for me. Thank you!

Daniel @  06/06/2007 12:18

WP 2.2
K2
I got this message before the post :


Erreur de la base de données de WordPress : [The used SELECT statements have a different number of columns]
( SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, 2 AS N FROM wp_posts WHERE 1=1 AND (post_type = 'post' AND (post_status = 'publish')) ) UNION ALL ( SELECT wp_posts.*, 1 AS N FROM wp_posts INNER JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'post' AND wp_postmeta.meta_key = 'STICKY' AND wp_postmeta.meta_value = '1' ORDER BY wp_posts.post_date_gmt DESC LIMIT 1) ORDER BY N, post_date DESC ,1

Daniel @  06/06/2007 12:18

WP 2.2
K2
I got this message before the post :


Erreur de la base de données de WordPress : [The used SELECT statements have a different number of columns]
( SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, 2 AS N FROM wp_posts WHERE 1=1 AND (post_type = 'post' AND (post_status = 'publish')) ) UNION ALL ( SELECT wp_posts.*, 1 AS N FROM wp_posts INNER JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'post' AND wp_postmeta.meta_key = 'STICKY' AND wp_postmeta.meta_value = '1' ORDER BY wp_posts.post_date_gmt DESC LIMIT 1) ORDER BY N, post_date DESC ,1

JoeyP @  06/08/2007 08:58

The sticky post is appearing twice on my home page as well. One at the top and one at the bottom. Does anyone know how to fix this?
I'm running WP 2.2.
Thank you.

Daniel @  06/10/2007 01:39

WP 2.2
I've made a change on the post and since every trying to fix result in a double apparition of the post…

Zaney @  06/12/2007 07:20

I am running WordPress version 2.1.2. I activated the plugin, added custom field STICKY with value of 1. I too get two appearances of the post at the top of the page and another at the bottom of the page. Any advice? Email me at zaney@zaneys.com with any suggestions

Edwin @  07/24/2007 02:05

This plugin rocks, much better then Adhesive. The problem with Adhesive is that it removes the previous and next navigation link in the footer.

Manish @  08/16/2007 03:16

Hi, Everyone seems to be comparing this plugin with Adhesive. What about WP-sticky ? Better version of Adhesive. So let me ask Vishal, (with due respect for developing this great plugin) How does this plugin compare with WP-sticky ? Can u kindly throw some light on the pros and cons of both.

stars @  08/22/2007 08:16

I'm running the plugin on my site an it works perfectly, THX very much!!!

Sendar @  09/19/2007 05:37

It is working Great.

Sendar @  09/19/2007 05:37

It is working Great.

Kym @  09/23/2007 07:57

Is there a place I can see this in action first before downloading the plug-in? Has an update been made to get more than one sticky on the homepage at a time?

nala @  09/28/2007 08:52

Nice Site!

paul @  10/02/2007 04:49

I'm trying to use the plugin but it does nothing. I added STICKY and value 1 to the gamesplanet blogstyle article but it does not stay in front.

Moving Services @  10/04/2007 09:33

Hi Vishal,
Thank you for the sticky.
I did everything by the book. My WP version is 2.2, sticky=1 etc...
It still does not show at the top :(

What am I missing?
Janka

Darren @  10/15/2007 02:13

Am using Wordpress 2.3 and this doesn't work... I think the new Database layout may have something to do with this...

Michael @  10/15/2007 03:32

Excellent idea for a plugin. However, it won't work for me (I have Wordpress 2.3). Does it work on existing posts or just new ones?

Shaun @  10/26/2007 09:46

I installed the plugin and added the custom field and value. It does not seem to have any effect. Can you take a look please.

http://www.skopemagazine.com/html/blog/

Thanks
S

Shaun @  10/26/2007 09:53

I installed the plugin and added the custom field and value. It does not seem to have any effect. Can you take a look please.

http://www.skopemagazine.com/html/blog/

Thanks
S

Shaun @  10/26/2007 11:41

I installed the plugin and added the custom field and value. It does not seem to have any effect. Can you take a look please.

http://www.skopemagazine.com/html/blog/

Thanks
S

pink @  11/06/2007 10:35

plugin worked perfectly! thanks so much!!

mikel @  11/08/2007 11:34

great plugin
works perfectly for me

Dr Chandravadan Mistry @  11/20/2007 04:40

Vishal you are doing GREAT

Qball @  11/30/2007 07:08

For those having problems after installing and adding the keywords and it doesn't work. I found a solution that worked for me.

I installed my wordpress into a subdirectory off the domain. ie www.domain.com/jci/ After installing it and adding the custom fields it didn't work.

This plugin expects the wordpress installation in the root of the domain. I had to edit the plugin file to get it to work.

I edited the file to account for that fact that when it's checking to see if it's the front page being displayed it would add my /jci to word count of the URI string.

Here's the original string in the file

if ((strlen($uri)==1) || (strlen($uri)<=11 && strpos($uri,'index.php')))

Here's my corrected for my particular installation

if ((strlen($uri)==5) || (strlen($uri)<=14 && strpos($uri,'index.php')))

This line will need to be edited based upon where you installed word press.

Perhpas Vis

oggin @  12/10/2007 06:52

Unfortunately this plugin does not work correctly with wordpress 2.3.1.

Niels @  12/12/2007 11:47

I'm working with WP 2.2.1, this plugin works great, exactly as described in the installation procedure. Thanks for the plugin.

Cheers,
Niels

af3 @  01/03/2008 08:41

Vishal, can this be modified so that it makes a post STICKY for each ROOT Category?

I've been looking for such plugin and this is something I believe close to it.. well probably not so close but hope that you can help.

thanks in advance.

Greg Malin @  01/09/2008 10:13

mr vishal, please visit Loadingvault.com in my opinion the best rapidshare search engine ever.

Dave @  01/23/2008 12:30

Dude. Brilliant plugin, works just as it should. Of the three I tried, yours fits the bill. Thanks.

David @  02/05/2008 07:58

Hi,
How can I make 3 posts go to top on blogs instead of 1 only?
Pls let me know.

yen @  02/29/2008 12:28

Thanks! Works like a charm! :D

3dogs @  03/03/2008 12:46

I second the question about making it a sticky post per category. Possible?

Mandy @  03/05/2008 04:50

I installed this plugin and it now shows a double post how do you get rid of the double post? Thanks

John @  03/11/2008 04:34

I also have a problem with the sticky post showing up twice. Any thoughts?

needfornews @  03/21/2008 06:30

http://needfornews.com/top_search.php

Chris Merriman @  03/30/2008 02:13

It would appear that this plugin has problems with Wordpress 2.5?

I get the following error <code>
WordPress database error: [Table 'wp_posts' from one of the SELECTs cannot be used in global ORDER clause]
( SELECT SQL_CALC_FOUND_ROWS wp_posts.*, 2 AS N FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ) UNION ALL ( SELECT wp_posts.*, 1 AS N FROM wp_posts INNER JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'post' AND wp_postmeta.meta_key = 'STICKY' AND wp_postmeta.meta_value = '1' ORDER BY wp_posts.post_date_gmt DESC LIMIT 1) ORDER BY N, wp_posts.post_date DESC LIMIT 0,10
</code>

ONLY if Stickypost 1.1 is activated. With all other plugins active, error does not occur. I'm assuming a code change within WP2.5 has caused this issue?

This was on my test blog - test.chrismerriman.c

Chris Merriman @  03/30/2008 02:57

Just noticed there isn't a 'subscribe to comments' type plugin, nor e-mail field for when we submit comments. If you would like to trace this issue with my help at all, please do feel free to contact me - best address would be
personal AT chrismerriman DOT com

Jason @  03/31/2008 06:11

I must be missing something - when I activate this and don't have anything as a sticky I get the following error:

Sorry The Post You Are Looking For Had Been Deleted

and none of my pages, post display.

If I sticky a post it will come back with the same error - but if I sticky a page the page will show up but yet again no other posts, pages will.

Suggestions?

Chas @  05/17/2008 02:08

You say simple,
but the other sticky was a button called "Make this post sticky".

Chas @  05/17/2008 02:22

I really stuck my foot in my mouth. YOUR Sticky is vastly superior to the other choice. The other one almost needs it's own help files.

Now, I beg a question......can a second post be set to "2" or is the "1" a true false thing.....
Thanks for the cool & simple file.
- Chas

Kaput @  05/25/2008 11:31

It does not work with WP 2.5.1. I installed the plugin successfully, then set a custom field with the KEY as STICKY and the value as 1 to the post I want making sticky. It had no effect whatsoever.

Kaput @  05/25/2008 11:41

Just an update: I installed the WP-Sticky plugin instead and that works great with 2.5.1. I recommend that plugin instead if this one does not work for you...

Brad @  06/04/2008 10:50

It would seem that when I activate the Sticky plug in (not even use it on a page) the Home page does not display. It gives me, "Not Found Sorry, but you are looking for something that isn't here." and then displays the Search option

(I am using Ad Clerum theme with 5 widgets on WordPress version 2.5.1.)

Ed @  06/06/2008 11:11

Same problem as Brad here, thank you for creating a plugin that messed up my blog...


This plugin should not be made available to the public.

Mahendra Shah @  06/18/2008 08:16

Impressed. Wish I could learn more from you to develop
my blog for my cartoons, paintings, kavitartoons and articles posting. Your tutorials will help me. Loved your poems. Congratulations for your media exposure.

Mahendra Shah @  06/18/2008 08:16

Impressed. Wish I could learn more from you to develop
my blog for my cartoons, paintings, kavitartoons and articles posting. Your tutorials will help me. Loved your poems. Congratulations for your media exposure.

Mahendra Shah @  06/18/2008 08:16

Impressed. Wish I could learn more from you to develop
my blog for my cartoons, paintings, kavitartoons and articles posting. Your tutorials will help me. Loved your poems. Congratulations for your media exposure.

Stefan @  07/22/2008 05:01

Same problem as Brad and Ed. Post was published but did not show up on the home page (index.php) After deactivating plugin post came up fine. Running WP 2.6.

Sofia @  08/06/2008 03:16

Running WP 2.6. With this plugin activated the blog doesn't show any posts at all. Just says "sorry, no posts available".

Adrian @  08/18/2008 04:21

Uber cool plugin. The best sticky plugin I have used out of all of them out there.

Adrian @  08/18/2008 04:23

Uber cool plugin. The best sticky plugin I have used out of all of them out there.

Post your comments
Name
Url
Comment

Submit


 

Rate Entry2.57
( 7 Votes)

 
1 2 3 4 5
Vote
1-Poor 5-Excellent