Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.1   Updated Friday, February 20th, 2009 at 6:18pm

Interstitial Ads Plugin for WordPress

This plugin allows you to automatically add javascript (or anything else) to all links on your WordPress site. One common use for this is the implementation of interstitial ads, which require javascript to be added to each link, although there are many other possible uses.


  If you have found this page useful, please consider donating. Thanks!


  • Download the above file
  • Rename dd-interstitial.txt from .txt to .php and upload it to your plugins directory
  • Activate the plugin from the WordPress admin panel
  • Configure the options under the admin panel: Options – DDInterAds


To use this plugin, simply go to the options page and enter the code you want added to all links.

Change Log

  • 04-21-08 Version 1.1 – Code is now ignored if it is in code, pre, or textarea blocks.
  • 05-23-07 Version 1.0 – First release.


For those of you using this plugin to add interstitial ads, often times you must also add some javascript (provided by the advertiser) to the header of your files. You can do this in the header.php file in your theme directory.

This plugin uses the ob_start function for output buffering to allow filtering of the entire page before display. While this generally works without any problems, certain plugins may conflict with this – especially if they are using a similar method. Keep this in mind when troubleshooting.

Lastly – Future options may be added depending on interest in the plugin.