BlogTariff


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
http://wordpress.org/plugins/insert-post-ads/ )
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

<?php
//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.

Post a Comment Gmail ID

  1. Well ! http://www.wikihow.com/Earn-Money-Through-Google-Adsense 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 : Goresellers.com

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

    Thanks for the review.

    ReplyDelete

Do not Try to Add Spam Comments

 
Top