RoadToBlogging Logo

How to Create and Style a Sticky Post in WordPress

Imtiaz Rayhan

WordPress offers hundreds of features and functionalities to it’s users. And most of the users are not aware of all these functionalities. I, myself don’t know all of them. But the more I am using WordPress, the more I am learning.

Just in case you don’t know, there is a built-in option in WordPress to create a sticky post. Here on this post I will write on how you can make a sticky post in WordPress and style it to make it stand out.

Before moving to that, let’s see why you should use Sticky Post function. BY using this

  • You can stick any important post for your readers.
  • You can promote any offers/Afiliate programs
  • It gets more attention.

How to Create a Sticky Post in WordPress

Creating a sticky post is very easy and simple. You don’t need any plugin or other coding to do that. This is built into WordPress. You can find this option under “Visibility” section in the “Publish” box.

Click on ‘Edit’ where you see “Visibility: Public“. You’ll see several options. Check the box where it says “Stick this post to the front page”. Follow the image below.

Create Sticky Post
  • Save

After checking this, Click on OK. Now when you’ll publish your post this post will be on top of all posts in Homepage. Next, let’s see how you can style this a bit.

Also Read : Create a Sticky Sidebar Widget That Scrolls With You!

How to Style Sticky Post in WordPress

You must do some styling to make your Sticky Post stand out. This is quite easy to do.

Open the style.css file of your theme and add the below code anywhere in that file.

.sticky {background: #edf8ff; border: 2px solid #d5dbe2;}

Here we gave the sticky post an unique background and a border so that it looks different from other  posts.

This code will result into this –

Stciky Post
  • Save

The one with a light blue background is the sticky post and the white one is a normal post.

However, if you know a little bit of CSS you can change the code according to your needs or to match the colors with your blog. You can also use a background image instead of a color.

Note : You might not see the changes immediately. Clear your cache to see the changes.

That’s it! Now go and create some sticky posts. Let us know through comments if you face any difficulties while doing this. Also don’t forget to subscribe to our updates using the form below.

written by

Imtiaz Rayhan

WordPress Enthusiast, PHP Developer. Music Addict, Led Zeppelin Fan. Conncect with me on Facebook, Google+ and Twitter.


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Hey Imtiaz Rayhan,

    I thought we have to change many things to create sticky post. I didn’t think that this is a very easy work as you have mentioned. Thanks bro :-)

Get our latest posts delivered straight to your Inbox. No spam, ever.

Share via
Copy link
Powered by Social Snap