How to Place Google AdSense Ads in a WordPress Theme


Published on

Find out how to place Google Adsense code in a WordPress Theme. Want WordPress support services? Hire Neogain to develop your website.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

How to Place Google AdSense Ads in a WordPress Theme

  1. 1. How to Place Google AdSense Ads in a WordPress ThemeThis article is all about placing Google AdSense Ads within a WordPress theme. Though tobegin with you need to make sure you are actually using the right theme! You shouldntwork around a theme, but instead be able to work with a theme.So if you need a WordPress theme designed just for you, else help modifying an off theshelf theme, you should hire our Hull web designers, to help you. Our team of themedesigners at Neogain can help you, so please contact us to dicuss your requirements.There are many ways you can place Google AdSense into a WordPress theme. We will tellyou about how to place the adverts, plus suggested locations in a theme.Tip – Dont use a WordPress plugin to place adverts within your theme.There are numerous plugins that can help increase functionality, but there really is no needto use a plugin if you intend to run a set of adverts for a long period of time. Otherwise youare just adding another plugin without reason, which means additional code, and possiblyan issue when upgrading your WordPress blog.Tip – Use simple html code to align your advert.All you need to do is to use the editor within the WordPress dashboard, when you arelogged in as an administrator to place the code. This means you can easily place advertswithin your template.Example codeGoogle Adsense Link Unit in the header area, would be placed in the header.php code.<div style="width:828px; margin:0 auto; text-align: center; border-top:10px; border-bottom:2px; ">Google code</div>A Google Display advert in a blog post, would be placed in the single.php code.<div id="theadcode" style="float: right;">Google code</div>If you were placing Adverts on a page it would be in the page.php code. If in the sidebaryou would place a div container with the advert code in a text widget.Tip – Use multiple Google AdSense advertisements within your Template.Having just one advert on a page is a missed opportunity. If you have an article at the top,but someone reads the whole page, you are then missing a potential click at the bottom,and vice versa. Also there are different types of adverts, covering: text, graphical, size andstyle.It is worth utilising the different areas of a WordPress theme to place adverts. For instancean AdSense link unit under the heading, one display adverts at the top of a post, another inthe sidebar and a third at the bottom, means youve got all the areas covered.There is a limit on the amount of adverts you can use, which you should always check the
  2. 2. current limits. However I believe you can currently use three link units, with three otheradverts such as two display adverts and one text advert.However adverts can not only perform differently based on the type of advert and position,but also the theme being used and the content itself.Tip – Adjust the Text Advert Colours to match your website colours.It has been noted by some that they gain higher results, if the colours of the text within acolour advert matches the colour of the text of their website content. If you require WordPress support, please get in touch.