Join Our 1500+ Community Readers

We hate spam as much as you!

Earn online with Google Adsense Ads on Wordpress blogs inserting code inside post content

In our earlier posts on this blog discussed about How to insert Google Adsense Ads on Blogger on blogs? in middle of the content using small CSS code.

Here the same method Wordpress users now can insert ads inside posts or in between two paragraphs of the content post. Popular website authors suggest that Wordpress platform is best for its themes but difficult in theme improvisation and Blogger blogs were earning sources of authors with Google Adsense where users can insert ads anywhere in the blogger blogs templates are friendly to users.

This article is special for Wordpress users and here we educate you How to insert Ads in Wordpress template inside of the content posts. Webmasters don’t need to work hard for adding this plugin to their Wordpress theme its easy and most of the Wordpress users are running on their blogs successfully.

Sign into your Wordpress account
From Wordpress Dashboard click on Plugins -- > Add New
In Search Plugins box type as Insert Post Ads and Go

Click on Install Now link and activate it.
Under Post Adverts Click on Add New above settings link

(To get code directly or for manual installation follow the below link )
Now write Advert Title and paste the below code. Select the number of paragraph where you wish to display ads follow Publish button to activate.

Go to Post Adverts -- > Settings under option ‘Where do you want ads to display? choose your styles as mentioned in the image below eg. Posts, pages, forums, topics, replies to display your ads and click on ‘Save settings’ button.

Trick to insert Ads inside content without using plugins

In this method users don’t need to apply plugins, without using any type of plugins.
Sign in to your Wordpress account
From Wordpress Dashboard Click on Appearance -- > Editor

Click on Theme’s function.php located at right sidebar
Now Copy the below code and paste it on Editor panel

//Insert ads after second paragraph of single post content.
add_filter( 'the_content', 'prefix_insert_post_ads' );
function prefix_insert_post_ads( $content ) {
$ad_code = '<div>Your Ads Code Here</div>';
if ( is_single() && ! is_admin() ) {
return prefix_insert_after_paragraph( $ad_code, 2, $content );
return $content;
function prefix_insert_after_paragraph( $insertion, $paragraph_id, $content ) {
$closing_p = '</p>';
$paragraphs = explode( $closing_p, $content );
foreach ($paragraphs as $index => $paragraph) {
if ( trim( $paragraph ) ) {
$paragraphs[$index] .= $closing_p;
if ( $paragraph_id == $index + 1 ) {
$paragraphs[$index] .= $insertion;
return implode( '', $paragraphs );

After successful adding code in Editor panel, click on Update file button
Code Customization

  • Change ‘Your Ads Code Here’ with your ad code
  • Replace 2 with your choice value of paragraph to display ads
 Authors Words
If you really enjoyed with our Article then don't forget to Subscribe to US. We always respect your valuable feedback.

    You May also Like Trending Posts


enlighten on November 18, 2014 at 3:21 AM said...


enlighten on November 18, 2014 at 3:25 AM said...

Well ! this link helps to make money through Google Adsense . Like Adsense,Advertising, Marketing, Direct ad sales, Blogging etc . Likewise, many of the sites introducing new methods to make money from home through online. Some of them producing scam and some of the sites are trust-worthy to do online business. in my point of view, Reseller business is one of the legit method to do in online.

Source :

Ujjwal Kumar Sen on February 27, 2015 at 7:29 AM said...

Hello, you are absolutely right about the ads network, But I have used Bidvertiser its just amazing.

Thanks for the review.

Meena Kumar on March 7, 2015 at 4:02 AM said...

Cool stuff. Interesting to read.
HTML Training in Chennai

Post a Comment

About Me

My Photo
Krishi Omli
Dedicated blogger - Always endeavor to know new things and share with others.
View my complete profile

Money Tariff

All Your Tech Needs

How to Help us?

If you feel our blogging Tutorials helped to you, then help us to spread our voice by using the below badge:-


Try a Back Links

Total Pageviews

| Blog Tariff | Blogger Tricks | Blogging Tips | SEO | Earn Money | Blogger Templates © 2009. All Rights Reserved | Template Style by Blog Tariff .com | Design by Brian Gardner | Back To Top |