Adsense skyscraper not showing in sidebar

  • WeightLossLadder

    #5370

    I’m still in the process of customising the Graphene theme for my blog, and I must say I love it. Thanks to all the hard work that’s gone into developing this theme.

    That said, I have another glitch. I’ve successfully put Adsense into the blog, now I’d like to also add an Adsense skyscraper in the far right sidebar. Got the Adsense code, copied it into a Text widget. Placed widget in said sidebar.

    Now the skyscraper shows, but instead of google adsense content, I have it filled with a ‘this page cannot be displayed’ message.

    Anyone any ideas?

    Site is http://www.weightlossladder.com

    Thanks!

    WeightLossLadder

    #31715

    Please ignore, working now, must have been a Google adsense issue.

    ronangelo

    #31716

    It’s not displaying in the homepage.

    It may be due to this: #Google_ad_limit_per_page

    try to temporarily disable adsense on the graphene options, if the skyscraper appears,

    then the maximum no. of ad units may have been reached.

    WeightLossLadder

    #31717

    Hi ronangelo, that was the reason. The skyscraper was showing on every other page except my home page.

    When I disabled the adsense option on the home page, the skyscraper appeared. Thanks

    Admin

    Syahir Hakim

    #31718

    You can limit the number of ads that the theme adds if you’re using a child theme.

    WeightLossLadder

    #31719

    Thanks Syahir

    That would be good. I probably would limit the ads to one or two on the home page, together with the skyscraper.

    Is there a simple way I go about doing this? I’m not a programmer.

    Josh

    #31720

    Do you already have a child theme setup? I don’t see one currently being loaded on your site.

    https://forum.graphene-theme.com/graphene-support/how-to-modify-the-theme-using-a-child-theme

    WeightLossLadder

    #31721

    Hi I’m a bit confused about all this.

    A friend has created a graphene-child sub folder within themes, and uploaded a styles.css file and copied and pasted from the post you linked to (and changed some of the parameters).

    We haven’t activated anything yet (a bit worried in case of problems). What do we do next and where can we get code to limit the Adsense ads to 2 per page?

    Thanks again

    Admin

    Syahir Hakim

    #31722

    Go ahead and activate that child theme first. If your child theme has been correctly setup, the assigned Custom Menu will be reset, as will the custom header and background. This is standard WordPress behaviour, so just go ahead and reconfigure your Custom Menu and custom header and background. Everything else should remain the same.

    Post back here when you’ve done the above.

    WeightLossLadder

    #31723

    Hi Syahir

    Sorry if this is obvious, but what’s a Custom Menu? Header and background I’ve got.

    Been doing a lot of work customising this theme and don’t want to lose all my hard work so I’m very cautious before I activate the child theme.

    ronangelo

    #31724

    Custom Menus: http://blog.kjodle.net/2011/08/25/how-to-create-and-use-custom-menus-in-wordpress/

    You won’t lose anything from activating a child-theme. If you turn it off, then the site’s appearance will go back to the way it was.

    WeightLossLadder

    #31725

    Hi ronangelo – thanks.

    Child theme is now activated. Header reloaded, and widgets tidied up. Look forward to hearing the next instalment!

    Admin

    Syahir Hakim

    #31726

    Okay, now create a functions.php file inside your child theme’s folder. Then add this code into that file:

    <?php
    function graphene_custom_adsense_limit(){
    return 2;
    }
    add_filter( 'graphene_adsense_ads_limit', 'graphene_custom_adsense_limit' );
    ?>

    That will limit the in-between posts adsense ads to just 2, leaving 1 more ad available for your sidebar.

    WeightLossLadder

    #31727

    Thanks Syahir, that worked a treat!

    Great stuff, much appreciated.

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

You must be logged in to reply to this topic.