Adding code to the top of every post in WordPress
Again, to monetize my blog, I wanted to add Google AdSense to the top of every post. It turns out, that wasn’t too hard: Create a php file in the mu-plugins folder Add the following code to the file function the_content_googleads($content = '') { if (is_single()) { $content = stripslashes(get_googleads_code()) . $content; } else { [...]








Saturday, April 7, 2007
Comments Off