Posted in Coding, Featured, php, SEO, Web Content

Like this post? Share It :
  • Print
  • email
  • PDF
  • Google Bookmarks
  • Facebook
  • Twitter
  • MySpace
  • Yahoo! Buzz
  • del.icio.us
  • Digg
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • Reddit
  • Technorati
  • Design Float
  • RSS

How To Display Adsense Ads On Posts Older Than 4 Days

Ever wanted to display your Adsense ads after a specific period of time, like displaying your ads only on the articles older than 4 days. This can greatly improve your adsense income and your readership as the regular readers on your blog will feel privileged and most of the traffic coming to older articles will be from search engines which will result in high RPM. This simple tutorial will help you along.

Procedure:

Note: Do take backup of the file before you try this.

01. Place this code in your single.php file where you want to display your adsense ad:

<?php
if (strcmp( date("Y-m-d", strtotime("-4 day")), get_the_time("Y-m-d") ) > 0) {
?>
INSERT YOUR AD CODE HERE<?php
}
?>

 

02. Change 4 to any number so that the ad get displayed on only the posts which are older than the specified number.

This concludes this simple and useful tutorial. Hope you like it.


TutZone

Like this post? Share It :
  • Print
  • email
  • PDF
  • Google Bookmarks
  • Facebook
  • Twitter
  • MySpace
  • Yahoo! Buzz
  • del.icio.us
  • Digg
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • Reddit
  • Technorati
  • Design Float
  • RSS

Related posts:

  1. Add a jQuery DatePicker to Event Posts {WP}

Comments are closed.