• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding AdSense to every page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Adding AdSense to every page

This topic is: not resolved

Tagged: adsense, align right, Simple Hooks

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 8 months ago by peps2004.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 19, 2013 at 3:11 pm #46806
    peps2004
    Participant

    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 300x250 */
    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/
    June 19, 2013 at 3:46 pm #46812
    AnitaC
    Keymaster

    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?


    Need help with customization or troubleshooting? Reach out to me.

    June 19, 2013 at 3:56 pm #46815
    peps2004
    Participant

    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.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble