If you are using the Contempo or Notable or any other default blogger theme for your Blogger blog, you might have noticed that sometimes the featured post widget shows up on all pages, not just the home page.
This can be annoying if you want to highlight a specific post only on the main page of your blog, not on top of every single post and page of your blog. Fortunately, there is a simple solution to fix this issue.
Why Does the Featured Post Appear on All Pages?
The problem arises generally after you make some changes in the Theme HTML. It is caused by a missing conditional tag in the HTML code of the theme.
The conditional tag tells Blogger when to display the featured post widget and when to hide it. By default, the Blogger themes do not have this tag, so the widget is always visible.
How to Restrict the Featured Post to the Homepage
To solve this problem, you simply need to add the conditional tag in your featured post's widget code.
To add the conditional tag, you need to edit the HTML code of your theme. Here are the steps to do that:
Go to your Blogger dashboard and click on Theme.
Click on the dropdown icon beside the customize button and select Edit HTML.
Click on the jump to widget button on the top right corner and select FeaturedPost1 as shown in the below image.
You can also press Ctrl+F to open the search box and type in id='FeaturedPost1'.
You will see a line of code that looks like this:
<b:widget id='FeaturedPost1' locked='true' title='' type='FeaturedPost' visible='true'>
Add the conditional code cond='data:view.isHomepage' in the widget. After adding it will look like this:
<b:widget id='FeaturedPost1' cond='data:view.isHomepage' locked='true' title='' type='FeaturedPost' visible='true'>
Click on Save theme and view your blog.
You should now see that the featured post widget only appears on the home page of your blog, and not on any other pages. You can customize the widget settings as usual from the Layout section of your dashboard.
I hope this tutorial was helpful for you. If you have any questions or feedback, please leave a comment below. Thanks for reading!