09-05-07 UPDATE: I just wrote a new post about inserting adsense between multiple paragraphs in a wordpress blog post. Check it out for the best way to add adsense within a post without using a plugin!
Follow this link if you aren’t using wordpress and want to wrap text around adsense in you html code content.
I have been able to add Google Adsense to my wordpress designed blog pretty easily and make the text wrap around the ads.
However in order to do that I searched and searched unable to find any easy dumbed down version for those of us with little wordpress experience. So with that I will give everyone out there a quick and easy way to get up and going and then just link to this post in the wordpress forums about adding Google Adsense to your blogs.
First off, I am using the Google Adsense-Deluxe plugin provided by the guy running the acme tech website. There is another Google Adsense plugin for WordPress out there but this guy seemed to give a compelling argument that he upgraded Phil Hords Adsense plugin. My method will probably work for both but I spent a lot of time figuring this one out (which turns out should take about 5 minutes) so I may or may not try the other. Either way this should work for both. So here goes:
FOLLOW THESE WELL DESCRIBED STEPS: DON’T WORRY ITS QUICK I’M JUST DESCRIPTIVE
1. First you must go and get the Google Adsense-Deluxe plugin from the guys website who made it. To get it click
here.
2. In the middle of the page you will find the download button right above the Make a Donation button. Click it then follow the windos info boxes to save it somewhere (desktop works) and then unzip it and save the unzipped folder. There are several ways to do this, just make sure the files are saved to your computer and easily accessable.
3. Log on to your WordPress Blog manage page, where you write posts and edit settings. Click on the Options tab on the top (it’s between Users and Upload), then click on the Miscellaneous tab
This is where I was stumped for a bit having no plugin experience.
4. Once in Miscellaneous make sure the box right under the words Micellaneous Options in the upper left has a green check mark in it. It should say “Allow file Uploads” next to the box. If it isn’t checked click on the box to make the green check mark appear. Then within the Misc Options, the first option down, Destination Directory, in the text box make sure that whatever is currently in there ends the following way mine has www/nfblog/wp-content/plugins. I had to change mine by erasing the last portion (for the picture directory) then just having it end wp-content/plugins. Next the fourth option down should say “Allowed File Extensions” with a text box next to that with words like jpg and gif in it (Maybe it has none, mine had some extensions (words) in it already). Click within this text box after the last word (extension) and put a space with the space bar after it and type php. Just those three letters php (note it doesn’t have to be bold).
To finish updating the Miscellaneous Options there should be a button in the bottom right of the Miscellaneous Options box that says Update Options. Click that button.
5. Now you must upload the Adsense-Deluxe plugin that you just downloaded to your computer. First you must click the Upload Tab which on mine is located directly to the right of the Options tab.
6. Then click on the browse tab to browse your computer for the folder containing the Google Adsense-Deluxe files. The main folder that you downloaded should be called something like adsense-deluxe_wp_plugin. Within that folder go to the folder labeled adsense-deluxe_wp_plugin_v0.5. Within that folder there should be a file labeled adsense-deluxe.php. Click on this and then click open to add the file to the text box next to the browse button on the upload page in WordPress.
7. I didn’t put a description in the text box so you can or leave it blank, and then the thumbnail thing is up to you not sure where it puts a thumbnail but I said no thanks. Then all you have to do is click the button that reads Upload File at the bottom of the Upload box (should be next option after the thumbnail radial buttons).
There now its ready to use.
8. To use it you now have to go back to the tab labeled Options that you were first in. Once you click it you should see that there is another tab next to the last Options tab (for me it was next to the Miscellaneous tab) named AdsenseDeluxe. Click on that tab. If you don’t see it you might have uploaded the wrong file or didn’t type in the php part correctly, make sure to do this in step 4.
9. Once in the AdsenseDeluxe tab you can now paste your code. Open your Google Adsense account from Google preferably in a new window or tab, and pick all the options you want, then copy the code. Go back to your opened AdsenseDeluxe tab within WrodPress and scroll to the middle of the page in the place where it says New Adsense Block. Once here paste your code into the box labeled Adsense Code.
You can also add a name, keep it to letters and numbers and use underscore for spaces, as well as a description and you can make any of them default. Names will allow you to put in different code for different add setups and store them in your Adsense Deluxe Plugin to call them in you posts at anytime.
To test it out I marker it as default and didn’t give it a name or description.
10. Finally click the Add Adsense Block button in the lower right hand corner. This will add your code block to the plugin.
Now to use your code in a post and get the text to wrap around the code. I had some trouble at first getting the text to wrap around the code but just looked through somone elses code who had something similar and searched for a good way to do it. Here’s how:
11. First go to the Write Tab on WordPress or click on the manage tab to edit a current post. Either way open up a post to edit. Put your title in, and excerpt if you want, and then start writing your post. Keep writint, blah, blah,blah, and then when you know where you want to add your post all you have to do is go to the far right drop down box in the row that is labeled quicktags. Click on the arrow to access the drop down menu and it should have your adsense code in there looking like adsense or it might be have a name after the adsense part if you gave it a name back in step 9.
12. Click on the one you want or the only one there is there. and then in the text where the cursor was there should be this <!–adsense–>, and in the post preview part you should see that same text but as a green block with black words. However, if you were to publish the post your adsense would show up in your published post.
ALMOST DONE!
Now to get the text to wrap around the Google Adsense in wordpress. If you aren’t still in the write post part or edit post part then get there. Once there:
13. Add this code to your post just before the <!–adsense–> part, <div style=”display:block;float:right;margin: 0px 10px 0px 0px;”> and then add </div> after the <!–adsense–> part. This will allow the text to wrap around the Google Adsense. The portion call margin: with all the px’s after it allows you to add a margin to the Google Adsense so the text doesn’t merge. It goes top bottom left right. Play around with that or set them all to 0. See what works for you.
The final inserted code should look like this.
<div style=”display:block;float:right;margin: 0px 10px 0px 0px;”><!–adsense–></div>
YOU ARE DONE!!!!!!!!
Once you have the code in your post you can move it around quickly by copying (or cutting) and pasting it to new places in your text. Also REMEMBER that google doesn’t allow more than three ad blocks per page so remember to delete the code from old posts if you keep more than one on any page and have code elsewhere. Otherwise you can use the code in up to three posts.
I hope that wasn’t too long winded. I just didn’t find a good source for how to do this and had to do a lot of searching and nothing I typed into google, yahoo, or msn came back with anything for Getting text to wrap around google adsense in wordpress (or word press, or google adsense deluxe). Nothing. So in order to save others headaches my buddy told me to write this post. I hope you found it helpful.
Good luck!