Did you ever wanted to display adsense ads only on older posts? Doing so will greatly improve your readership why because the people who read your blog regularly will not get distracted from the content due to the advertisements. And as most of the visits to your old blog posts will be from organic listings, their visit will result in high RPM. So in this scenario, both you and your reader will get benefited.
How to Display Adsense Advertisements only on Old Posts?
- Login to your wordpress dashboard
- Go to Appearance -> Editor
- Select Single.php file (found on the right side panel)
- Add the following code where you'd like to display your adsense ads.
<?php
if (strcmp( date("Y-m-d", strtotime("-5 day")), get_the_time("Y-m-d") ) > 0) {
?>
#Replace this line with your adsense code#
<?php
}
?> - In the above code, replace the #commented line with your adsense code (See High Paid Adsense Ad Formats). Also don't forget to replace the digit "5" with your desired number (number of old days).



0 comments:
Post a Comment