404 Links on WordPress 2.0

If you’re, like I was, getting tons of 404 errors (file not found) in your statistics on a WordPress 2.0 based blog you are likely using adsense. Problem in short is the new preview feature in WordPress when you’re writing a new post. The adsense code gets triggers Google into trying to index your page thereby generating the 404s.

To fix this problem simply wrap your AdSense code using the is_preview() function:

  1. <?php if (!is_preview()): ?>
  2. // Your Adsense code.
  3. <?php endif; ?>

2006/11/13 at 23:21

Leave a comment

Separate_einz_small