How to Add Banner Ad to WordPress

Wordpress plugins

Placing Banner (AdSense) Ad Next to Site Title in WordPress Header

Wordpress plugins

A very common problem is adding an ad unit to your WordPress blog which displays in-line with your site title. Here is the simple way of doing it:

  • Open WordPress Editor
  • Open the header.php file
  • In this file – look for the following code <header id=”masthead” role=”banner”>
  • Make the following change to the hgroup tag

<hgroup style=”display:inline-block”>
<h1 class=”site-title”><a href=”” title=”Site Title” rel=”home”>Site Title</a></h1>
<h2 class=”site-description”>All about Jobs and Salaries</h2>

  • Immediately below the hgroup tag, add the Ad (Google AdSense) Code inside a span block as shown below:

<span style=”float:right”>
<!– Paste Ad Sense Code below–>

  • Save the file

Viola – you have successfully added a banner ad to your WordPress header inline with the site title and header.

Note: For this to be visually effective, your site’s title and description should be small.

Let us know if you found this tip useful in the comments section below.

Comment Policy: Comments adding value to the article are encouraged. Relevant links will be allowed in such comments.
If you think that you have a link that adds value to this article please contact us at techie[at]techzog[dot]com for evaluation of inclusion into the article.
Comments left solely for spamming links will be deleted. Thank you for understanding.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.