WordPress.org

Support

Support » Themes and Templates » Customizr » Adsense 728×90 on header

Adsense 728×90 on header

  • How can I show the responsive Leaderboard (728×90) Adsense ad unit in the space just above the menu? Let’s say, I remove the tagline and the social links. Or, can I place it below the menu, changing the overall size of the header space?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author nikeo

    @nikeo

    Hi,
    To do that, you could make use of the action hooks in Customizr :
    – ‘__before_header’,
    – ‘__header’,
    – ‘__after_header’
    – ‘before_navbar’,
    – ‘__after_navbar’

    1) Create a rendering function of your adsense ad :

    function display_my_adsense() {
    ?>
    <!-- PASTE YOUR GOOGLE CODE HERE -->
    <?php
    }//end of function

    To render it just above the menu, add this action :

    add_action('before_navbar' , 'display_my_adsense');

    Paste this code in your functions.php (atry different hooks if needded)

    Hope this helps and thanks for your feedback on this!

    I’m trying to place the same type of responsive ad on mine, but at the action hook “before_content_title” so that it’s right above the post title (I think).

    However, the ad isn’t showing up nor a blank space for it. I followed the instructions listed above (just changed the action hook).

    URL tested: http://www.johnrothra.com/nine-factors-hinder-evangelism-rainers-seven-plus-two/

    esmi

    @esmi

    Forum Moderator

    If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else’s topic.

    I am now closing this 9 month old topic as it references an older version of WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adsense 728×90 on header’ is closed to new replies.
Skip to toolbar