Insert ad after a specific paragraph in WordPress

 making money with wordpress

We have already seen many ways to insert advertising before or after content even applying certain rules or only for those who come from search engines, but there are advertising banners that how best they work is within the content .

In these cases the best thing of all is power even define in a way automatic after which paragraph of each entry will appear the ad in question. If that is your need there is a code that allows exactly that and it would be like this:

In this example the code makes a query to detect the date of each entry, and it will work in entries more than 30 days old and if you want to change it you only have to modify the string ] $ days of line 2.

You save and now you can put a code of this style in your theme, on the site (usually in single.php ) where you want it to be displayed advertising – only old tickets: