• Resolved mogenssejer

    (@mogenssejer)


    Im using adsensedeluxe plugin. I can show adsense in posts, but cant seem to make it work i templates. I want to show ads permanently in my header. I have tried to implement this code <?php adsense_deluxe_ads(‘Ad_Name’); ?> into both sidbar.php and header.php, but cant make it work. Can anyone tell me exactly how and where to put the code – and if its the right code to use. Im using Blix theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I just copied the code that Google gave me into sidebar.php – you can see the results on http://jpmcc.blogdns.org

    John

    Thread Starter mogenssejer

    (@mogenssejer)

    Hi John, I tried that too, but I dont know _where_ to place the code within sidebar.php. Can you help me out there?

    Hi mogenssejer,

    Look for something like this in your sidebar code:

    <li><h2>Categories</h2>
    <ul>
    <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
    </ul>
    </li>

    Once you find it copy it and paste it back in where you want the adsense to appear on the sidebar. Put in the name of the adsense section where “Categories” is (or just delete it) then delete what’s between the “ul” tags and put your adsense code in there.

    Thread Starter mogenssejer

    (@mogenssejer)

    Hi mharris

    I tried your advice, my code now looks like this

    <h2>Categories</h2>

    <ul class=”categories”>
    <?php wp_list_cats(‘sort_column=name&hide_empty=0’); ?>

    <h2><?php adsense_deluxe_ads(‘<!–adsense–>’); ?></h2>

    <ul
    <?php adsense_deluxe_ads(‘<!–adsense–>’); ?>

    So I tried to place the adsense code underneath the categories – but still no code shows up. Just an epmty block

    I’ve got the same problem…
    Any help here?

    I’ve even tried to put in the whole Google AdSense code, which you get from their site. It works fine for the header, but not quite for the sidebar, it shows either nothing or just the title ‘AdSense’. Which I put within the <h2>-tag.
    I’m using the 120×600 skyscraper code. Set as standard, but nothing works.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Where to put adsense code’ is closed to new replies.