Take a look at the home page of my site, Just Great Film, to see an example of this in action (click on images for full screen previews):
Here's an easy way to restrict the display of a gadget to your blog's home page.
Back-up your existing template
Before making any changes to the HTML code of your Blogger template, it's advisable to make a backup of your existing, working template code, just in case you make a mistake when editing or accidentally save unwanted changes!To make a back-up of your Blogger template, simply go to Layout>Edit HTML in your Blogger dashboard and click the "Download full template" link near the top of the page.
This will prompt you to save your existing template file as an .XML document to your computer, which you could later upload if you need to restore your theme.
About "Conditional" Tags
"Conditional" template tags enable us to dictate the type of page in which the enclosed content can be displayed.In this example, we are restricting the display to the home page only, and will be using the following syntax:
<b:if cond='"data:blog.url==data:blog.homepageUrl"'>
<--Content to be displayed on home page appears here -->
</b:if>
Anything which appears between the <b:if> tags will be displayed only on the home page. We can add any HTML content between these tags, including Blogger template tags.
If you're confident editing the template code of your blog, you can adapt the code snippet to suit your requirements. Or read on for the simplest way to add this function to your template.
The simplest way to add a featured content section on your blog's home page
If you're using Blogger's new template editor (the new format for Blogger templates) you can add a featured content section in a few simple steps:- Go to Layout>Edit HTML and locate the following section of code:
<div class='region-inner tabs-inner'>
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<b:widget id='Text2' locked='false' title='Some Title' type='Text'/>
</b:section>
<b:section class='tabs' id='crosscol-overflow' showaddelement='no'/>
</div>
Depending on whether you have installed a Page Links (or other) gadget, you may also see other gadgets housed within this section - Add the following lines (highlighted in red) to this section of your template code:
<div class='region-inner tabs-inner'>
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<b:widget id='Text2' locked='false' title='Some Title' type='Text'/>
</b:section>
<b:section class='tabs' id='crosscol-overflow' showaddelement='no'/>
<b:if cond='data:blog.url == data:blog.homepageUrl'><b:section class='tabs' id='crosscol-homepage' showaddelement='yes'><b:widget id='HTML1' locked='false' title='Add title if you want to' type='HTML'/></b:section></b:if></div>
This will add an additional gadget section (beneath your tabbed page navigation, if present) in which you can add home-page-only content via the Page Elements section of your dashboard.
I've added a placeholder gadget in this code so you can easily identify the section when editing your gadgets in the Page Elements section of your dashboard. - Now preview your template: if all goes well, you should see your gadget appear in place above the posts without error and can proceed to save your template.







80 Comments:
It took a minute, since I already had an "HTML1" but I got that figured out. Now to get some other widgets to just show up on the home page . . .
Thank you for this, but where can i get the gadget you are using? Looks really awesome!
Hey Amanda,
This looks pretty cool, but in fact I already knew how to do this. Do you know a way to show only the most recent post in Blogger in a different style than the others or something like that?
Thanks for all your tuts!
Uriah
Hi - thought i'd try this but having problems - I'm not very good with code (as if you couldn't guess).
I've found the right place to insert but I keep getting an error 'duplicate html1'. The reader above had similar problem but unfortunately for us simpletons didn't share the fix.
Any help here appreciated.
Also, once the change is working, I'm presuming you get some sort of extra 'widget' to customise with content in the normal way or does teh content require more code hacking? If so, where do we insert that?
Cheers - Jonathan
Thanks. I've been on the lookout for this kind of blogger widget. Can't wait to test it out on the blog!
Jonathan-just change the number from html1 to another number like 100 and this should resolve your problem. You just can't have two widgets with the same number in your template code. Good luck.
Hi Jenn - thanks for that - must have been having a Doh! moment back there.
So - I've got a customisable 'gadget' in my layout, now how do I turn that into a slide show / feature post gadget?
Jonathan.
thanks for tips. i ill try on my blog
hey Amanda i want to know can i ad more than one post to a new page other than home page so it will show as post by post in new page.
@Uriah W - It should be possible to have a different style for the most recent post using CSS selectors (:first-child). I did experiment with this a while back though it wasn't particularly easy as the markup of the new templates is heavy on divs so I had troubles applying targeting. I will look into it again though as soon as I've finished writing up the next post =]
@Jonathan Crouch - I'm working on a simple tutorial for a slider right now (hopefully to be published tomorrow). Almost any javascript-based slider/slideshow could be adapted for use with Blogger, but I hope to write up a tutorial which makes the process simple.
Blessings, my default red text showed: We were unable to save your template
Please correct the error below, and submit your template again.
More than one widget was found with id: HTML1. Widget IDs should be unique.
Is a declaration as such needed in my template attributing where code was obtained? **SAMPLE:
\ *__*
kudos jonathan crouch
\ *__*
-=-=-=-=-=-=-=-=-
I, support a Creative Commons Sharealike Attribution Noncommercial licensure
Hi - me again.
I got a 'featured post' widget working on the blog I write - http://solarpanelquoter.blogspot.com/ after a lot of trial and error.
I found these two posts quite helpful -
http://www.blogspotvision.com/2009/11/how-to-add-clean-slick-featured-content.html
http://www.hacktutors.info/2010/09/stylish-jquery-featured-post-widget-for.html
Although the 'background images' weren't available so I'm making my own.
Also, I found it hard at first to get my head around the sizing of the overall widget (since I've put my 'gadget' above the blog posts rather than the header (which caused background problems with the nav / pages bar widget)_
I'll post a full how-to with examples of my doctored code and some hints on image sizes etc later.
Oh and one tip - for the background and main 'slide show' images, I saved them in a draft blog post so blogger is effectively hosting my images.
Keep with it guys - if I can crack it, then anyone can.
Jonathan.
Hi - finished and working - here's a link to the code i used including the widget code with the sizes for how I've styled the featured content to appear.
http://solarpanelquoter.blogspot.com/p/code-share.html where you'll find a downloadable text document with everything you need (except images but I have included some handy notes on sizes etc).
Good luck with it.
Jonathan.
@Jonathan Crouch - So glad to read you've managed to install a featured posts widget =] I had a rather busy day and haven't managed to write up a tutorial for the widget I use on Just Great Film yet, but plan to do so asap.
Great tip for using Blogger to host images for the widget by the way. I usually use Picasa to host template images for free (especially as I can upload en masse) though your method would be just as effective.
You might also want to check out Google Code for free hosting any scripts (or even zip files of your code if you want to make them available for download). It's another incredibly reliable method for hosting stuff which we can't (yet) upload directly through Blogger.
Thank you for sharing your techniques!
Hi Amanda
Thanks for that - I've really learned so much from following your tips and posts here.
I'm no code whizz-kid and to some my 'widget' may look a little crude - still some style elements to play with when I get a moment - but it works and it's live.
I look forward to seeing your code - much prefer the visual look of yours on Just Great Film.
Cheers - Jonathan
p.s I'll look into the file sharing on google although I don't expect any server load issues for my little old text file. ( a man can dream though )
Furkan
Nice template,thanks for share
Dear Amanda,
I've been dying to add a featured content widget on my blogger blog, envious of all the beautiful ones I see on my friends' Wordpress blogs. So thank you so much for addressing this need! I can't wait to get your code for the Great Film widget as it looks very professional. Thank you for sharing all of this valuable info on dressing up our blogger blogs.
Vanessa
Usefull tips, thanks alot :)
I have the followers box on my blog but none of my followers in it, is there a problem today with followers or is it bcos I added a new background.. I have checked out some other blogs and they have the same problem.
Thanks for the great info!
its similar trick like hans blog...
http://beautifulbeta.blogspot.com/2009/02/selective-display-of-widgets.html
nice tutor...
nice to meet you master Amanda ^^
ooh. I will try it later. thanks for tips. thanks for sharing. :)
Very useful tips. Thanks for sharing :)
Learn how AlgoZone can help you with your business. If you have any questions about our products and service, please do not hesitate to contact us.
very nice mad added sites
nice tips check out
Karachi Girls Here this blog
http://www.girl.pk.blogspot.com
That was a nice and helpful small tutorial. Thanks for sharing.
Finally. I got it! thanks for this tutorial :)
Very cool, I'll have to bookmark this and try it on the next special I'm planning for my blog!
this is totally useless, don't call your article "how to add a featured content section" if you're not going to tell how to add a featured content section.
Hi Amanda
I am really looking forward to trying out this tutorial over the weekend. I have also learned something new from the comments: Google Code! I can't believe I never stumbled on it before.
and thanks to Jonathan for thinking out loud for us!
Thanks for the share and thanks for your patience and sorry for the inconvenience!
Very cool, Thanks for this tutorial.
I use it to my site, it works very well.
http://www.netdohoa.com/
Thanks!
sex
porn
free porn
porn
free sex
free sex
porno
escort bayan
So thank you so much for addressing this need! I can't wait to get your code for the Great Film widget as it looks very professional. Thank you for sharing all of this valuable info on dressing up our blogger blogs.
gucci outlet
bailey button triplet boots
ugg bailey button triplet
ugg boots sale
louis vuitton speedy
prono sporifs
bonus poker en ligne
bonus poker en ligne
jeu grattage
meilleurs bonus bingo
prono sporifs
bonus sans depot casino
casino en ligne bonus
casino en ligne bonus
prono sporifs
meilleurs bonus bingo
online baccara
baccarat casino
cazinou
keno gratuit
casino en ligne bonus
jeux casino
giochi casino online
jeux backgammon
casino en ligne bonus
jeu casino
casino en ligne bonus
casino en ligne bonus
casino en ligne bonus
machine à sous en ligne
machine à sous en ligne
Thanks !!!
casino VN
Nice post.Thank you for taking the time to publish this information very useful!
The author has written an excellent article. You have made your point and there is not much to argue about. It is like the following universal truth that you can not argue with: No truth is universal, everything has its exception. Thanks for the info penis enlargement penis enlargement pills VigRX Plus
Gracias, justo buscaba esto!
rutinas de gimnasio
This can be a fantastic website and I am unable to recommend everyone enough. Filled with helpful resource and great layout super easy around the eyes. Please continue this excellent work
thanks you nice post
This is one of the best post I've ever seen, you can include some more ideas in the same theme. I'm still waiting for some interesting thoughts from your side in the next post. One thing I just want to say is that your blog is so perfect!
@ Vimax, Vimax pills, VigRX Plus, Penis Enlargement, Penis Enlargement Pills
Very nice, thanks a lot.
Thaks a lot bro
Very cool, Thanks for this tutorial.
I use it to my site, it works very well.
Thanks for the share and thanks for your patience and sorry for the inconvenience!
Parse HTML
satibo online:http://www.naturalpills2u.com/satibo.html
Wodibo:http://www.naturalpills2u.com/wodibocapsule.html
sex medicine:http://www.naturalpills2u.com/
vigrx:http://www.naturalpills2u.com/vigrx.html
woman:http://www.specialitybrand.com/category/60.html
satibo online:http://www.specialitybrand.com/tags/satibo-capsule.html
Mojo Warrior:http://www.specialitybrand.com/product/mojowarrior.html
Satibo:http://www.specialitybrand.com/product/satibo.html
sex medicine:http://specialitybrand.com/
女性用媚薬:http://www.001kanpo.com/product/227.html
威哥王:http://www.001kanpo.com/product/55.html
紅蜘蛛:http://www.001kanpo.com/product/228.html
媚薬: http://www.86and81.com/Charming-medicine.html
精力剤: http://www.86and81.com/Energy.html
威哥王: http://www.86and81.com/product/55.html
曲美: http://www.86and81.com/Product/189.html
アナスイ
ANNA SUI
アナスイ 通販
アナスイ 財布
アナスイ 財布 通販
アナスイ 財布 二つ折り
アナスイ ポーチ
三便宝
巨人倍増
威哥王
SEX DROPS
脂肪燃焼
三體牛鞭
シアリス
三体牛鞭
催情剤
ru486 販売
福源春
唯美ob蛋白
唯美
補腎助陽
肥滿
v26 カプセル
v26 薬
v26
紅蜘蛛 通販
巨人倍増 販売
levitra
くらはちほう
新一粒神
小情人
ベニクモ
D10 媚薬
ハナチ
D5 原液
夜の健康食品
西班牙蒼蝿水
魔根
御秀堂
痩身一号
韓国痩身1号
媚薬蟻王
早漏防止薬
日本秀身堂
SUPER FAT BURNING
新陳代謝
VigRx
性欲減退
勃起改善
ED治療
精力剤
レイバン
Ray Ban
レイバン 通販
ray ban サングラス
レイバン サングラス
レイバン サングラス 通販
レイバン 偏光サングラス
レイバン 偏光
偏光サングラス
レイバン wayfarer
レイバン ウェイファーラー
レイバン ティアドロップ
レイバン クラブマスター
レイバン CLUBMASTER
RB2140
レイバン メガネ
レイバン めがね
レイバン 眼鏡
レイバン 伊達メガネ
レイバン フレーム
レイバン メガネフレーム
サングラス スポーツ
レイバン サングラス スポーツ
Its a great tutorial for featured post. Thanks author for this useful info about blogger platform
gucci outlet Fool, Snow Wolf is our trump card, and point you to disclose information, they are just like you scout, but cattle than you. Blue Army commander says proudly, as if he had foreseen victory in general. TYbhLQ
outlet gucci online Video watching, and following me and everyone here that there is an image in Hanoi in country Y, their domestic radicals, big parade in the streets burning our country nationals, the local government turned a blind eye, which has brought to China incalculable loss, and the other picture is the country's warships Y, Wei recently to seize our West Beach reefs, which has serious violation of our territory, they are provocative challenge to our country, our People's Liberation Army in the challenge. Zheng Hongming said excitedly banged the table.
gucci outlet mall Horses, thousands of miles on the line, Dushu climbing, Rulvpingdi, the name Red Rabbit: Special offer and Xiandi to help Tiger. "Cloth will pull over to make
gucci outlets Home son? "God can not be. Chenliu Wang refers to God, saying:" This is the current emperor, was the chaos Ten Attendants, fled to this. Wu Nai Wong www.cheapguccioutletonline.com
Post a Comment