HOW CAN I DO THAT?

Followers

Thursday, April 26, 2007

Inserting AdSense Code in Posts

I've taught you to Parse the HTML of the AdSense code. Now I'm going to give example of placement.

This first tutorial of placement is to put the code in the post below the Post Title and above the post body. This will show the Adsense code in the first post on your blog page, but when when a specific post is opened up on its own page, the code will always show up in that post.

You will notice the placement in the image to the left. I took a picture just in case I had chosen to change my Adsense placement by the time you were reading this post.

You will notice that for this application I chose the small banner, 468 X 60 so that it would take up most of the width of the posting area.

To accomplish this place go Dashboard>>>Layout>>>Edit HTML...click on "Expand widget templates". It is in the right corner at the top of the Edit box.

Scroll down in the template code until you find this line:

<div class='post-header-line-1'/>

Below that line insert your parsed HTML for the Adsense code that I taught you how to make in the last post, and hit SAVE!

Always remember to keep a copy of your template safely stored on your own computer in a NotePad file....just in case!

In the next tutorial I will teach you how to wrap the AdSense code in a post!

33 Comments:

  1. Crème de la Blog said...
    Your site has been reviewed at Crème de la Blog.

    Great work here.
    R.J. said...
    SORRY THAT THIS IS OFF TOPIC BUT I JUST WANTED TO THANK YOU FOR YOUR HELP WITH MY BLOG ISSUES. IT'S IN PERFECT CONDITION ON ALL BROWSERS. ALL I DID WAS RESTORE IT. I REALLY GOT TO LEARN MY HTML. LOL
    Bonnie Calhoun said...
    R.J...I'm glad that you are back on track! Keep up the good work and you'll learn!
    Jack Snow said...
    First of all let me say what a great site you have, you really helped me a lot so far. Thank you for that!
    I just stumbled across one thing: I inserted the adsense code into my blog just the way you described it, and it works fine but for one thing: My ads show up in three posts, not just the first post (as I want them to do). I'm really stuck on this :-(
    Jack Snow said...
    OK, I figured it out myself. I didn't notice that you got 2 adsense blocks on the left sidebar so you got only one block left for the posts. Thanx anyway ;-)
    Sophy George said...
    PLEASE REVIEW MY BLOG.
    www.electronics-4-you.blogspot.com
    Ronald said...
    Good tut, i will try ASAP for my blogspot... thanks
    Vilantae Acne Treatment said...
    Hmm very interesting. Hope i can use them too. thanks for the help.
    Appleiphone forum said...
    It is not hard i think. I was afraid of applying to adsense of some fear. I think i should not be afraid,


    Thank you for the post. I am starting to believe that i can do it.
    Humor said...
    It is not hard i think. I was afraid of applying to adsense of some fear.
    Anonymous said...
    Hi Bonnie:

    I haven't been here before but I need help. I'm confused.

    Are there at least three ways to put adsense ads on your blog? www.blogger.com

    I went into layout...page elements on my adsense account and clicked on add a page element and clicked the adsense one. I was prompted to pick a size and color which I did (configure adsense format). When I go back to my blog I do see two ads (I did one above and one below) that have to do with blogs.

    Afterwards I read your instructions on how can I do that which has to do with the expand widget templates.

    Then there's the adsense instructions where I'm supposed to copy code and put it somewhere in that html jumble - couldn't figure that one out.

    If I've done the add page element do I need to do something else or is that it?

    If you would like to look at the blog. I'm working for someone - her blog is Diaglogue with God at discoursewithgod.blogspot.com.

    Thanks for your help,

    Chey
    Bonnie Calhoun said...
    Hi Chey, it is not necessary to use all three methods. One method of adding them is fine.

    The Adsense element is a relatively new widget. Before it came about you took the code that Adsense supplied you with and you put it in a HTML/JavaScript page element.

    You can still use that method now, but a lot of people use the Adsense element :-)
    Anonymous said...
    Hi.
    great blog u have. i am new to adsense and have a question. i would like to add adsense to the right hand side of my blog since the left hand side is quite full. i read to insert the adsense code after this : "Begin #sidebar -->
    div id="sidebar"div id="sidebar2"" - - - - BUT the problem is that this doesnt appear in my html template. what can i do???

    ALSO - another question - when I signed up for adsense they asked if i agree to share info. reg. my account with their "PARTNERS". I said "yes" but i don't really understand what that means and if its ok that I agreed to this.

    Thanks:)
    Bonnie Calhoun said...
    In the sidebar, you can just use the Adsense widget. There's no need to parse or mess with your HTML at all. Go to Layout...on your Page elements page, in the right sidebar, click "add a page element". When the widgets open, choose the Adsense element, and follow the directions in the Configure box that opens!

    And saying "yes" to sharing your info with their Partners is fine! :-)
    Anonymous said...
    Thanks so much. I have the old template so now i am installing the new one in order to do what you said. one more thing - how do i change the size of font of my ABOUT ME profile? i cant seem to find how to do so in the new font and color feature..thanks
    Anonymous said...
    Another question please - I want to remove the UNDERLINE that suddenly appears under my POST TITLES. how can i do this? i think i regret switching to the NEW layout - it is really annoying...:) Anyway - thanks for all your help. i still dont know how to create a 3rd column on the right. my te,plate is a brown SCRIBE....Thanks so much
    Bonnie Calhoun said...
    Hi anonymous! The font size of your About Me file is controlled in your CSS, which is the declarations toward the top of your template. But the fone size for the About Me is probably the same font size for several other things, so if you change it for one, it will change it for all the others that use that text delimitor.

    The underline for post titles is the same thing. It is a declaration in your CSS at the beginning of the template code.

    BEFORE messing with your template HTML, always save a copy of your template on your own computer, in a NotePad file, so that if you emss something up, it is not a fatal error.

    Also...when you change something in your template HTML, use the "Preview" button, instead of the save button. That way if you don't see the desired effect, you can discard the edit without needing to figure out what all you cnaged.

    When you get the desired effect....then SAVE the change :-)
    Anonymous said...
    Thanks....for all your help. I appreciate it. I will update you what happens.
    Anonymous said...
    Hi again,

    small update:
    ok; I upgraded to a new template - now i have the LAYOUT feature which is cool since i added new stuff on my blog. BUT - at the end i decided to just leave the adsense on the left column because making a new column on the right is a big mess. BUT - now i have new problems.....all the post fonts are messed up - -let me explain. for each new post i add a picture as well. now - after i've upgraded the layout - the words in the post are a bit messed up - and appear by "letters" to the side of the picture. so i am going over my entire blog now (!!!!) to make sure that words begin after the picture, in an orderly fashion. (2)Also - another question - after my upgrade - i notice an underline on my post titles. how do i get that off? cant seem to find how. thanks
    Bonnie Calhoun said...
    I am going to need the URL of your blog to check out your source code and tell you what to change!
    Anonymous said...
    Hi Bonnie!
    Thanks for your help. As you can see, I am anonymous (...), so I prefer to stay that way...I wanted to ask you another small question regarding the GOOGLE serach bar I added just now. Anyway - I added it to my site (on the bottom page cuz it was too dominated on the top) - and when I click in a word to test it out - it shows me no results in google or in my blog which is weird because i type words that are, obviously, in both google and my website. do you happen to know why this happens? thanks again. THANKS!!!
    Bonnie Calhoun said...
    If you have just added it, you will need to wait for Google to populate your page, and grab the fact that the search bar is there for it to be activated. A lot of times it is not instantaneous!
    Systems Overload said...
    Bonnie:

    I found this article when looking through the Google Blogger group. I'm having a problem with Adsense at my family blog..
    http://dcheronfamily.blogspot.com/

    I have a few threads going between the Blogger and Adsense groups. I originally pasted code into my posts at this blog, and after running across a video on YouTube, I used the Adsense widget. I would like ads to appear in my posts, but if they appear at the top of the posts, then I will be over my limit of 3 (because I have placed two via the widget). I'd like to read the rest of the series so I can determine how to place the ads in a different location in my posts.

    Also, I've been told that I have jumbled up my Adsense code and that is why it doesn't show in the blog. I'd like to correct this but don't know enough about code to fix it at the template level. I can remove code from each post without a problem, but if there is a problem with my template that is harder to figure out. Thank you.

    Darryl Heron
    Bonnie Calhoun said...
    To start off with. you are only allowed 3 Google Adsense ads per page...Period!

    If you have more than three sets of code on a page, the others won't show up. They appear in the order of precedence. In other words if you have always had three sidebar adsense blocks, you won't be able to get any others to appear.

    If you've "jumbled" up the adsense code in a particular location, remove the whole piece of code, and go to your Adsense account anf create a new piece of code!

    The whole series of posts are in the Adsense label in the isdebar.
    Anonymous said...
    Hi,

    Its me again - Anonymous....
    Anyway - the google search box gave me trouble since it doesnt work when i try to serach for stuff from within my blog so what i did was just deleted the code, and added the code that enables a GOOGLE search only (not a search from my blog) - and that seems ok since if someone wants to search for info. within my blog - they can use the blogger search box. so what i have left now is only the google search box which seems to be ok.
    I have 3 more small questions - one - can i make $$$ from visitors using the search box? and (2) - why isnt anyone clicking my adsense? should i remove it? (3) - i now have a blog in blogger. i am thinking of opening another blog. do u recommend wordpress? i read that wordpress doesnt enable google adsense. is that true? and BTW - is it worthwhile to open a blog in a personal domain? thanks again for your great help!!!!
    Anonymous said...
    and one more thing - do u have an idea why the search box couldnt find search entries from within my blog? its weird cuz i used the adsense search wizard and just answered the few questions there and pasted the html code to the widget in my blog.so i really dont understand why terms searched from within my blog couldnt be found. thanks again.
    Maggie said...
    Hi,i did follow your instruction copy and paste the adsense code below the
    (div class='post-header-line-1)
    and it came out different way ,it should be show on the top header instead of sub-header.please let me know how to do that.
    Thank you so much.
    Maggie.
    Victor said...
    I have never understood how you do this on Blogger. In wordpress I use a AdSense Plugin (Adsense Deluxe or something) but on my wordpress blog I can only manage to put the Adsense in the sidebar.

    I think this post will raise my income with a couple of daily dollars. Thank you!
    billrainier said...
    I can't say enough about it. I love it.
    Anonymous said...
    Hi, Thank you for your informative article. Is there a way so I can show these ads only when a post permalink is accessed?

    This puts ads below the headline for my first few posts, and leaves a gap between headline and content for the others. It will be great if you could help out :)
    Bonnie Calhoun said...
    Sorry! That is way beyond the capabilities of Blogger.
    Anonymous said...
    Oh.. well :( Thank you for your help. :)
    Joel said...
    Thanks for the nice tips here. I am learning a lot from your blog.
    Please do keep going on with this great work.

Post a Comment