Blogger template tags to customize your layout and design
This post is mainly in reply to a comment from a fellow blogger Shankar Ganesh which read
And I have a question: how did you hack the code to display Adsense units under each post header only when a particular post link page is loaded?
The basic idea behind the Ad placement is the correct usage of
“<MainPage> </MainPage>” “<MainOrArchivePage> </MainOrArchivePage>” and “<Itempage> </Itempage>”
(no quotes required) tags provided by blogger. Any thing you put inside these tags will appear only on ‘MainPage,’ ‘Main and ArchivePage’ and ‘Post Page’ respectively. You can use this to specify any piece of code to appear only on the above pages. So basically my code appears like this
<!– Begin #main-content –>
<div id=”main-content”>
<Blogger>
<!– Ad header only on Main or Archieve Page–>
<MainOrArchivePage>
JAVASCRIPT FOR THE LINK UNIT ON MAIN AND ARCHIVE PAGE HERE
</MainOrArchivePage>
<BlogDateHeader>
<h2 class=”date-header”><$BlogDateHeaderDate$></h2>
</BlogDateHeader>
<!– Begin .post –>
<div class=”post”><a name=”<$BlogItemNumber$>”></a>
<BlogItemTitle>
<h3 class=”post-title”>
<BlogItemUrl><a href=”<$BlogItemUrl$>” title=”external link”></BlogItemUrl>
<$BlogItemTitle$>
<BlogItemUrl></a></BlogItemUrl>
</h3>
</BlogItemTitle>
<ItemPage>
JAVASCRIPT FOR ADSENSE 468×90 RECTANGLE HERE
</ItemPage>
And this will tell you how I did this. I used the full code so that all can understand it easier.
so that you will get the updates automatically to your feed reader.
Tags: Adsense, Answer, Blog, Hacks, Tips
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


No comments yet.