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.
Some related articles you may like :
- What to do when you can’t log-in to blogger
- Blogger Play – view images being uploaded to Blogger
- AutoSave on Blogger
- Why is my template selection page in WordPress showing cryptic CSS
- Importing the older posts from my Blogger Blog
- Customize your iGoogle page with themes
- Customize your send to shell menu using sendto toys
- How to get your new blog post indexed instantly by Google
One Comment
Hey, i found your website via yahoo. it’s very great. i will come back again. thank you,Iike pandora uk jewelry.