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:
- <?php if (!is_preview()): ?>
- // Your Adsense code.
- <?php endif; ?>
Leave a comment