Tagged: , ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #821

    I know that there have been several posts about this, but I’m curious if anyone has added an adsense banner into the header and if they did, how they went about it. I want to put a banner either above the logo or else under the slider. Anyone done this?

    ~Vago

    #33003

    The easiest way to do this would be opening up header.php and copy / paste the Adsense code where you want the advert to appear.

    If you need help, let me know exactly where you want the banner and what size it is.

    #33004

    Hello, I was trying to do this too. I have the adsense code from Google. Like James Morrison said, I tried to post it in the header section after:

    <!– title –>

    <title><?php if (is_home()) { bloginfo(‘name’); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(”); ?></title>

    but it didn’t work. Also how to I control where I want to appear in the banner. I think the other objects in the banner are gonna move if I don’t place the adsense code correctly.

    Also the code I obtain from google is in this format:

    <script type=”text/javascript”><!–

    google_ad_client = “XXXXXXXXXXXXX”;

    /* scitechverse top */

    google_ad_slot = “2648573701″;

    google_ad_width = 468;

    google_ad_height = 60;

    //–>

    </script>

    <script type=”text/javascript”

    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>

    </script>

    Do I have to add special syntax in the header.php page?

    Thanks a lot. You guys are awesome!

    #33005

    Can anyone please help with the above problem? Thanks a lot.

    #33006

    I’d place the code somewhere after the body tag. I’m not familiar with google adsense though so you might want to add it to the head section.

    #33007

    Yeah I tried that but if I put it in the head section, it moves the search bar and other stuff to weird places. can’t figure out how to do it? That would be a lot of help.

    May be you guys can include that in future updates. Bunch of places for users to input ads, kinda like you put ads if you want to and just leave it if you don’t want to.

    Can you please help with this guys? or anyone who knows how to do this?

    #33008

    Okie, just to clarify more, please take a look at this screenshot, http://i.imgur.com/EykBI.png,

    The red box on the top is where I want the ad to appear.

    When I use this code,

    echo ‘

    <table cellspacing=”0″ cellpadding=”3″ border=”0″ align=”left” width=”95%” class=”tborder”>

    <tr>

    <td align=”center”>

    ur adsense code here

    </td>

    </tr>

    </table>’;

    the ad appears on the header at the wrong place and all other stuffs on the header are moved. This is the screenshot of what happens, http://i.imgur.com/n163w.png

    Can you please help with this.

    I think a lot of other people are interested so, it would be good for all of us.

    Like I mentioned above, it would be a positive thing in future to give options for posting ads in different places of the webpage. I think it’s a selling point for you guys.

    Thanks again for all the help

    #33009

    Hey Dude, can you please reply to this post?

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

The topic ‘adsense banner in header’ is closed to new replies.