Using Sticky Posts to Add Categories in WordPress: The What and How Of It

Since WordPress offers so many different features, it’s not surprising if you miss out on some of the features, especially if you’re new to WordPress. One useful WordPress feature that you might not even know exist is Sticky post. In this post, we’ll talk about the need of sticky posts, and how they can be created and displayed on a WordPress site.

Importance of Sticky Posts in a WordPress Site

WordPress blogs, by default, display the latest post at the top of the homepage in a reverse chronological order.

But, what if you want some of your posts to appear on the top of the other posts? You can achieve this objective with the help of Sticky Posts. Simply mark the posts as Sticky – that you want to be displayed at the top of your website homepage – for as long as you would like. Put simply, you have any post featured on the front page of your site, by adding a sticky post to it. And thus, sticky posts can help bring the focus of your site visitors to the most important content – that you want them to visit first.

In case, you would like to remove any of your sticky posts, then you’ll have to do that manually; or else, you can add an expiration date to those posts using some plugin, such as Expire Sticky Posts.

The sticky post feature was released with the WordPress version 2.7, but it isn’t easy to find.

How to Create Sticky Posts in a WordPress Site?

Creating a sticky post for a WP install is very easy. For this purpose, the first thing you need to do is to login to your WordPress website admin panel. Once you’re logged-in, from the admin dashboard, follow the steps mentioned below:

  1. Go to the Post menu in the Post editor.
  1. Now open up the post page where you would like to add sticky post. On the right side of the page, you’ll find a Publish box that looks something like:

  1. Hit the “Edit” link next to the Visibility option within the Publish meta box.
  1. Check the checkbox “Stick this post to the front page”, and click OK.
  1. Click on the Publish button. This will help to add a new sticky post to your WordPress blog.

Displaying Sticky Posts on Your Site

So, now that you’ve successfully created a sticky post, you may feel the need to display the sticky posts in different areas as per your needs. Let’s consider an example, wherein you want to fetch the 3 latest sticky posts, and wish to display the title of each sticky post together with a link. To do so, simply copy and paste the code snippet below into your theme’s function file or in a plugin file.

In order to display the newly created sticky posts, you just use the [latest_stickies] shortcode. You can place this shortcode in a WP powered post, page, or any text widget.

In Conclusion

Thanks to WordPress sticky posts, you can ensure that the most important content of your WordPress site remains in front of your blog visitors, even when your post has been added to the archives. Using sticky post, you can make any of your posts to be featured again for a day, a week or an entire month as you see fit.

Author Bio: Juana Steves is a mobile application developer for Xicom Technologies, which provides iPhone App Development Services. She loves sharing technical information of mobile technology and provides concrete information on technologies like iOS, Android mobile apps development.

Joe Granados the author

Joe Granados is the owner of WebDevTuts. He is also a web designer & developer who loves to design and develop websites. If you're looking for him you can find him via @webdevtuts

Leave a Reply