How to Add Google Adsense to WordPress Posts without Plugin

Google Adsense without Plugin

When Google Adsense code can be implemented easily without a Plugin then why to choose adsense Plugin for your WordPress blog posts? You can implement Adsense code in your blog post in just few minutes without any Plugin.

Those who don’t know how to create a Plugin for their website and also don’t want to use any adsense plugin can use this trick to implement Adsense code to WordPress blog post.

In this article, we will show you trick to add Google Adsense code in WordPress post-single.php file. You may find this file with different names in your theme like:

post-single.php

postsingle.php

single-post.php

singlepost.php

How to add Google Adsense code in post-single.php file?

Step-1:

First login to your Google Adsense account and create a 300 x 250 Adsense code.

Step-2:

Now login to your WordPress Administration panel.

Step-3:

Click on Appearance section > Editor option.

Step-4:

Select Single Post (post-single.php) under themes template section.

Step-5:

Now find <div class=”entry”> or <div class=”entry clearfix”> or <div class=” entrytext “> in post-single.php file.

Step-6:

Paste your Google Adsense code just below the <div class=”entry”> code.

Step-7:

Click on Update File button to update the file.

Optional:

You can put you Adsense code between <div></div> tags. This will allow your ads to position where you want it. Below example will show ads on right side of your post.

Right side example:

<div style="float:right; padding-top:10px; padding-right:5px;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 300 x 250 Side Bar Rectangle -->
<ins
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-0000000000000000"
data-ad-slot="9876543210"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>

If you want to show ads on left side of your post, change float:right  to float:left. You can also change padding-top and padding-right to 0 or remove both the padding, if you don’t want to set.

2 thoughts on “How to Add Google Adsense to WordPress Posts without Plugin”

  1. Ataur Rahman

    I have a Google adsense account but not enough click. Recently approved. Very low income. Thank you so much for One of the best articles.

    1. keep posted good and informative articles, you will certainly get good income.

Leave a Comment

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

Scroll to Top
Scroll to Top