Google Adsense: Create Custom Position In WordPress Theme

Google Adsense

Google Adsense is one of the good plugins to display google ads on your site. It is easy to use and we can easily maintain google ads on their site.

By this plugin we can select the place where exactly we want to display google ads.

Google Adsense

Above image is an example which displays red markers are the places where you can insert your google ads.


One of our clients required to use Google Adsense plugin to display google ads on their site which is developed by us. Unfortunately, after installation of AdSense plugin markers are not displayed. The reason behind this was the Theme used for the website is a custom theme and the space required to display Google Ads are not empty.


So, I have to dig into this why the markers are not displayed on the custom theme template and hence concluded on that the empty space does not exist as per the Google AdSense plugin and for this, I have to create custom Google Ad spot in my custom theme.


To create your own position for insert google ads on the WordPress site, you just need to insert below code display available place marker:


<ins id=”adsense-home” class=”adsbygoogle-placeholder” style=”display: none;”></ins>


To display available place marker you need to take care of ID value in above snippet. Your ID should be unique, if it's not, then it will not work for you.

Hope this helps you well, feel free to add your comments/feedbacks and need more assistance regarding WordPress services, Hire WordPress Developer to be in touch