I was thinking to embed Google AdSense code in website (WordPress website) header title. It is really easy to add Google AdSense in website (WordPress website) header with website title.

This need to edit in two files that related to current WordPress theme. These file are

  1. style.css
  2. header.php


This file is responsible for overall layout of theme. This contain various containers for title, post metadata, post content, body etc
We need to define another container with its dimensions that would reflect on website. Below code need to add in end of file

.ads-header-desktop {
display: block;
float: none;
width: 1120px;
margin: 2% auto;
margin-top: -90px;

This code will align your Google AdSense just right to Website title. You should adjust width and margin-top as per your requirement. Better way to check is firefox firebug, with this tool you can test your code real time without editing your code on server side.


This file is responsible for maintaining things that are visible on Website’s header.
We need to add Google AdSense code in this file and related it to container that should mention in style.css

<div class=”ads-header-desktop”>
Google AdSense Code

Now you can refresh your website, website would contain GoogleAdSense with website title in header