How to embed Project Wonderful ads into WordPress themes
When I first started using Project Wonderful, my intention was to place a few of the 125x125 pixel ad spots in the top section of my sidebar. Initially I thought this would simply be a case of copying the code supplied by Project Wonderful, and pasting it into the appropriate spot within my WordPress theme. Unfortunately that wasn't the case. Pasting the Project Wonderful code directly into the theme resulted in the ad blocks failing to display.
After emailing Project Wonderful tech support, I was told that the only way they'd found to have the Project Wonderful ad blocks display properly on WordPress powered blogs was to paste the code into a text widget. Apparently there was some issue with php stripping out line breaks within the Project Wonderful code when returning the page, or something equally as technical sounding.
So, why didn't I just paste it into a sidebar text widget you ask? Whilst the theme I'm currently using is easy to "widgetize" I have preferred to hard code the sidebar so that I have more control over what sits where and how it displays. Hard coding has also allowed me to display different menu items and/or ads on different page types. Whilst I may one day fully widgetize the theme, I currently have no intention of doing so. This meant that if I wanted to use Project Wonderful on SwollenPickles.com I had to find a solution.
So, in case any one else is scratching there head, trying to figure out how to hard code Project Wonderful ad blocks into their WordPress blogs, here is the solution I found to get things up and running. If you aren't familiar with editing WordPress themes then what follows may be next to useless, for everyone else, I hope it makes some sense!
Step 1.
Create a straight html file and paste your Project Wonderful ad block code within it. Here is an example of what the code in that file could look like.

Within the body tags you can also include any styles and sub headings you'd like to display with the ad block. Save the file with the html file extension. For the sake of this example, lets call the html file "project-wonderful.html".
Step 2.
Upload your html file to your server, taking note of the location you upload it to.
Step 3.
Modify your WordPress theme. Make sure you back up you blog and theme files before proceeding, just in case something screws up. It's unlikely, but then again, sometimes unlikely stuff happens, I mean, just look at the Spice Girls Reunion. Now figure out where you want your ad block to show up. Not all themes are the same, however a majority will have the following template files, header.php, sidebar.php, footer.php, index.php, single.php, page.php. Depending on where you want the ads to show up will depend on which file you'll need to edit.
For the sake of this example, we want to display the adds at the top of the sidebar, so open up the sidebar.php file in a text editor (eg. Notepad). Find the appropriate spot where you want the Project Wonderful code to appear and insert the following code:
![]()
Change the section within the quote (") marks to reflect the location you uploaded your html file to.
Save your changes and go visit your site. With any luck you should now see the Project Wonderful adblock.
If anyone knows of a better solution, I'd be glad to hear it!
Tweet This!


If you are including it, then don’t add the ,, etc- it makes the page invalid and you don’t need them.
Sorry, I’m a bit confused. Which bit don’t you add?
It seems to have cut some of my message out, I was saying don’t add the html , head, and body tags.
sir,
I want to show inline ads by miva or texts ads by Bidvertiser.com in wordpress.
how can i proceed, kindly help me in this regard.
thanks
future pakistan
http://www.futurepakistan.com
I have never used bidvertiser or miva, but if you want to include them within wordpress posts download the “mighty adsense” wordpress plugin. That’s what I use to get ads showing up in posts.
If you just want it showing up within the theme, hard code it in the area you want it to appear, eg. open the header.php file and whack it in there if you want it in the header etc.
[...] The solution that we’d been recommending to users has been that if you use the text widget, the comments get translated faithfully and your ads will show up fine and be detected fine. This solution still works great if you’re happy with a column of ads on one side but it doesn’t help users who want to do something more clever with their ad placement. This has been driving us (and some of you) crazy. The good news is that Dale over at http://www.swollenpickles.com has solved the problem! It involves some familiarity with editing Wordpress themes but if you’re at the level of wanting more control over your Project Wonderful ad box placements then you should be able to work it out. Here are the instructions! [...]
Thanks for asking me to download “mighty adsense†wordpress plugin. But when I find out the website, I could’t get any download link from their website. I tried many links on that website but failed.
Kindly send me the exact download link, if you can.
Thanks
http://www.futurepakistan.com
here you go:
http://mightyhitter.com/main-page/plugins/mightyadsense
Thanks! This is really useful information — or, well, it’s not yet, but I’m hoping it’ll be useful to me in a few months.
[...] have inserted them. If you are using Wordpress as your blogging platform, then this article on how to embed project wonderful ads into your Wordpress theme should put you on the right [...]
[...] despite pursuing advise on the matter,I’ve hit a snag. WordPress may have extensive free user features, but does not allow me to [...]