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.

Some related articles you may like :

  1. What to do when you can’t log-in to blogger
  2. Blogger Play – view images being uploaded to Blogger
  3. AutoSave on Blogger
  4. Why is my template selection page in WordPress showing cryptic CSS
  5. Importing the older posts from my Blogger Blog
  6. Customize your iGoogle page with themes
  7. Customize your send to shell menu using sendto toys
  8. How to get your new blog post indexed instantly by Google

This entry was posted in Uncategorized and tagged Adsense, Answer, Blog, Hacks, Tips. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted January 3, 2012 at 6:46 PM | Permalink

    Hey, i found your website via yahoo. it’s very great. i will come back again. thank you,Iike pandora uk jewelry.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>