Tricks

Insert Ads In The Post Content After 1st Paragraph in WordPress

How to Insert Ads In your Post Content After 1st Paragraph in WordPress
There are many ways to insert adsense or other advertisement in your WordPress post/page content, you can insert it before the content or after the content, but how to insert your ad in the post? I mean after the first paragraph, or after the second paragraph.

First open your single.php file and look for the content code that would look something like this:


Then you can replace that code with the codes below:

", $content);
for ($i = 0; $i 
Insert Ads Here
"; } ?>

You may change the number of paragraphs by changing $paragraphAfter line.