How to Show Featured Posts in WordPress Sidebar without Using Any Plugin

wordpress featured post

We follow several methods to attract readers to a specific post. Featured post widget is popular among them. We display a particular post or list in sidebar under the head Featured or Author recommended posts. The blog readers will visit the appropriate link if interested on that topic.

WordPress library contains hundreds of plugins to assign and show featured posts in the blog page. A number of widgets are suitable for list posts that come with post title and a thumbnail image. Some others will show a medium size featured image along with post title and excerpt. But limited customization is the main drawback of all these plugins unless you are going for premium subscription.

I was using a cute plugin widget until a couple of months back in one of my blogs to show author recommended posts with scrolling effect. Then I had to re-install the site because of some compatibility issues. Unfortunately I forget to note down the names of plugins I was using. I don’t have a website backup too. I have just export file with me and it was a sudden decision to reinstall as there is no other way to restore the site.  After that, blog is working fine but I failed to get the same plugin to show featured posts in WordPress sidebar. I searched a lot and tested almost every plugin I can. But none of them worked up to my expectation and requirement.

Now I can say that you need not any third party plugins to show featured posts in WordPress sidebar. See the example below,

wordpress featured post plugin

You can show similar widgets in WordPress without any plugin or complicated coding. Here’s what should you do,

1. Login to WordPress admin panel.

2. Open desired post from the Posts screen to set it as featured. Copy the post title and image.

3. Go to Appearance > Widgets > Text Widget. Paste your post title in the widget title area.

4. Open a new tab in the admin panel. Go to Pages > Add New.

5. Paste image. Link it to your post address.

wordpress featured post plugin

6. Switch page screen to html mode and copy the entire code you seen. Paste it to the content section of your text widget. Click Save.

7. Go to front end and right click on the text widget. Choose inspect to find its div id. A code block will be highlighted in blue color. Check what div id is showing in the above line. It will be like this, <div id =”text-7″ class=”widget widget_text“>. Copy text-7 from this example.

8. Go to Custom CSS section of your theme settings or CSS Style sheet under Appearance > Editor head. Add the following code to insert a border around the widget.

#text-7 { border : 1px solid; }

Replace text-7 with your widget id. If you want to give space in between the content and border, add one more line in the above block.

padding: 5px 5px 5px 7px;

So our final code will be,

#text-7 { border : 1px solid; padding: 5px 5px 5px 7px; }

Feel free to customize these parameters as per your requirement.

Save all changes. Done !

 

  • shilpagarg

    That’s interesting. Thanks for sharing the step by step process to add posts in the sidebar without using plugins and making it easier for us to follow. Will try it out!

    • Thank you very much for the comment. Keep visiting our blog.

  • Thanks for sharing these steps, that is a cool way to do without the plugin. I will definitely give it a try.

    • Hi Praveen,

      Thanks a lot for dropping your comment with us.
      Keep in touch