Adding AdSense to every page

Community Forums Forums General Discussion Adding AdSense to every page

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  peps2004 1 year, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46806

    peps2004
    Participant
    Post count: 8

    I’m setting up a new site and want to include an Adsense ad on the right hand side at the top of each page. From what I can tell, the code can be entered in any of the following simple hooks for it to appear where I want it to:

    genesis_post_title
    genesis_after_post_title
    genesis_before_post_content

    The problem I’m having though is that this is shifting the rest of the text to the left the entire way down the page. You can see an example here http://leechildbooklist.com/lee-child-die-trying/

    Is there some kind of additional code I need to include to stop it from shifting it to the left? The code I’ve entered is:

    <div style=”margin: 5px; float: right;”>
    <script type=”text/javascript”><!–
    google_ad_client = “ca-pub—————-”;
    /* Book List 300×250 */
    google_ad_slot = “5141080867″;
    google_ad_width = 300;
    google_ad_height = 250;
    //–>
    </script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
    </script>
    </div>

    n.b. I’m using the Sample child theme if that makes any difference.

    http://leechildbooklist.com/lee-child-die-trying/
    #46812

    anitac
    Participant
    Post count: 6991

    Do you want it at the top of each PAGE/POST or at the top of the Page/Post inside the CONTENT area – for example, you open up a page/post and within the confines of the content – you’ll see that add on the right?


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #46815

    peps2004
    Participant
    Post count: 8

    I’d assumed that they were the same thing, so I’m not too sure what the difference is between the two. I guess out of the two though, I’d want it to display within the content area.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.