How to show links on homepage only on Blogger templates
This is a very helpful hack that is useful to those of us that accept advertising links on our blogs. Most of the time those who contact us only want the ad to show on the home page only. First of all I would create the widget as a link list this way you can easily find it when editing your HTML. This is also going to be helpful because the code will be there unless you change it, so if you get more then one just ad it to the original widget!
OK go to Design in your dashboard and then edit HTML, remember to expand widget template. Again Ctrl F so that you can type in the term you want to search for.
Most widgets start with this code so in the search box type in
once you find that code highlighted look for the name of the widget you created IE
Now just below this you should see a piece of code that looks like this
once you find that you want to ad this code right below it
Still with me? Ok the last part is to close the tag so enter this code at the end and before the next widget code starts
Ok then now everything that you include in that widget will be visible only on the home page.
What I have found helpful is to keep the widget alive even if you don't have an ad there. This way you don't have to keep adding the code time and time again. I will just keep a link to my blog or another page there like your facebook profile or twitter! Hope this has helped
OK go to Design in your dashboard and then edit HTML, remember to expand widget template. Again Ctrl F so that you can type in the term you want to search for.
Most widgets start with this code so in the search box type in
<b:widget id=once you find that code highlighted look for the name of the widget you created IE
<b:widget id='LinkList2' locked='false' title='Title' type='LinkList'>Now just below this you should see a piece of code that looks like this
<b:includable id='main'>once you find that you want to ad this code right below it
<b:if cond='data:blog.url == data:blog.homepageUrl'>
Still with me? Ok the last part is to close the tag so enter this code at the end and before the next widget code starts
</b:if>
</b:includable>Ok then now everything that you include in that widget will be visible only on the home page.
What I have found helpful is to keep the widget alive even if you don't have an ad there. This way you don't have to keep adding the code time and time again. I will just keep a link to my blog or another page there like your facebook profile or twitter! Hope this has helped
Subscribe to:
Post Comments (Atom)


1 comments:
Thank you! I have one ad like that now but I didn't do it myself so I had no clue!
Post a Comment