By default your blog’s side bar widgets in Blogger or WordPress can be seen and displayed sitewide, meaning they will appear in every page of your site.
If you wish to make a side bar widget displayed on Homepage only, just follow the easy steps below:
How to show Blogger Widget Only In Home Page
- Sign in to your Blogger account
- Click on the drop down menu and click on Template
- Remember to always download a back-up copy of your template before editing.
- Now go to “Edit HTML” page, click proceed then the a window containing your html template will open, mark “Expand Widget Templates”
- Using Ctrl F, search for: <b:widget id=’HTML
- Look for the title of the widget you would like to place in homepage only, the code will look like this <b:widget id=’HTML5′ locked=’false’ title=’Title of your Widget’ type=’HTML’>
- After finding the code to be displayed only in home page, add the codes in red to your template as shown below. Make sure to follow the correct format and click on Preview page before saving your edited template.
<b:widget id=’HTML5′ locked=’false’ title=’Widget Title Name’ type=’HTML’>
<b:includable id=’main’>
<b:if cond=’data:blog.url == data:blog.homepageUrl’>
<!– only display title if it’s non-empty –>
<b:if cond=’data:title != ""’>
<h2 class=’title’><data:title/></h2>
</b:if>
<div class=’widget-content’>
<data:content/>
</div>
<b:include name=’quickedit’/>
</b:if>
</b:includable>
</b:widget>
8. It is all set and done. Your chosen blogger widget will no longer appear on blog’s other pages.
How to show WordPress widget Only In Home Page
- Login to your WordPress account.
- Click plugins then click add new in your dashboard.
- Install plugin page will open, now search for exec-php in the search box
- Install the plugin
- Go back to your dashboard, click on appearance then click on widgets
- Drag the text widget to your side bar choosing the place where you would like it to be seen
- Copy this code: <?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
Add the Advertisement or link code here and it will be displayed on the homepage only
<?php } ?>
8. Save your Text widget and you’re done.
Easy peasy isn’t it? Now you can have the widgets of your choice to be displayed only on your blog’s homepage. Happy Blogging 🙂
Wow! I really need this one. I didn’t know that there is a wordpress plugin that can do this kind of stuff. Thanks, I will try it!
I’m having an easier time adding plugins as the options are more generic in blogspot than wordpress.
Whoa! somehow it didn’t occur to me that there was a thing like a sidebar widget for the homepage only. How ignoramus could I get? I can follow these instructions though. That I can guarantee at least, lol
Handy tips you have here mommy joy! Thanks!
this is the part of the blogging scene where i really do need a lot of improvement: the design details, the codes…i am always at a lost:) good thing there are sweet blogger friends that always stretch out hands to help me out:)
I was able to use this on wordpress some time ago. Thank you!
You’re so cool! I do not believe I’ve read something like that before.
So great to discover somebody with genuine thoughts
on this subject matter. Really.. thank you for starting this up.
This site is one thing that’s needed on the internet, someone with some originality!