1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please help me with thesis (adsense code insert)

Discussion in 'General Programming Chat' started by newkid..., Feb 11, 2010.

  1. newkid...

    newkid... Jr. VIP Jr. VIP

    Joined:
    Jan 13, 2010
    Messages:
    846
    Likes Received:
    556
    Location:
    Planet Earth
    Home Page:
    Hello there,

    I am using thesis<<Blogussion template. I need to put Adsense after the header and before the post start. I am attaching picture where exactly I would like to put the adsense (the area is in light green color).

    Your help will be highly appreciated. Trying from last 14 hours but unsuccessful. Thanks in advance

    [​IMG]
     
  2. richjerkoff

    richjerkoff Junior Member

    Joined:
    Apr 7, 2008
    Messages:
    159
    Likes Received:
    79
    Location:
    UK
    I assume you didn't buy Thesis because if you did the support in the forum is fantastic. You need to understand about Thesis hooks to do this and there is a ton of info on the net about them.

    This might help...]

    Code:
    http://www.thesishacker.com/place-a-row-of-ads-on-your-page
     
    • Thanks Thanks x 1
  3. newkid...

    newkid... Jr. VIP Jr. VIP

    Joined:
    Jan 13, 2010
    Messages:
    846
    Likes Received:
    556
    Location:
    Planet Earth
    Home Page:
    To b true, i have not bought so far becoz i thought to experiment with it first. Once I decide to use this theme, anyway I am going to buy it. I have access to all the documentation but I am dumb in coding LOL :p

    Tried to do the same as per the link... added following in the custom_functions.php

    function ad(){?>
    <div class="ads">
    <ul >
    <li>GOOGLE ADSENSE CODE</li>
    </ul>
    </div>
    <?
    }
    add_action('thesis_hook_after_header','ads');

    But it did not work/// page got blank

     
    Last edited: Feb 11, 2010
  4. richjerkoff

    richjerkoff Junior Member

    Joined:
    Apr 7, 2008
    Messages:
    159
    Likes Received:
    79
    Location:
    UK
    Try this, it worked for me. Put it in custom_functions.php.

    function adsense_code () {
    echo '<center>

    ADSENSE CODE HERE

    </center>';
    }
    add_action('thesis_hook_after_header', 'adsense_code');

    If it doesn't it might be the Blogussion skin messing it up, as it is quite complex and does many things to alter Thesis.
     
    Last edited: Feb 11, 2010
  5. Pannassius

    Pannassius Newbie

    Joined:
    Feb 7, 2010
    Messages:
    5
    Likes Received:
    0
    use thesis custom hook and add it into after header