Ad Space

by on December 10, 2010  •  In Tutorials

If you take a look at the header and the footer, you will see two optional ad spaces available throughout the whole site. These spaces will take HTML or JavaScript, so you can add your AdSense or ad server code, or even just a straight static link and image using HTML.

If you wish to add more ad space to your site, it is easy using Custom Actions.

Here is a quick tutorial on how you can add an AdSense spot at the top of your first sidebar:

function adsense_sidebar_spot() {
   <div class="side-widget">
      <script type="text/javascript">
            google_ad_client = "XXXXXXX";
            google_ad_width = 300;
            google_ad_height = 250;
            google_ad_format = "300x250_as";
            google_ad_type = "text_image";
            google_color_border = "FFFFFF";
            google_color_bg = "0000FF";
            google_color_link = "FFFFFF";
            google_color_text = "000000";
            google_color_url = "008000";
      </script>
      <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
   </div>
}
add_action('arturo_sidebar_top', 'adsense_sidebar_spot');

Just place the above code into your Custom Actions editor and voila!

Tags: , ,

About

c.bavota is a web developer from Montreal. He runs bavotasan.com and Themes by bavotasan.com. Every once in a while you will see him floating around cyberspace.

http://bavotasan.com

2 Responses to Ad Space

  1. c.bavota December 10, 2010 at 5:22 pm

    Here is a comment.

    • c.bavota December 10, 2010 at 5:22 pm

      This is a reply to the comment above.

Leave a Reply


BUY NOW
Select a theme: