Customizing & Adding Adsense To Your Wordpress Blog
There will probably be a text file that was included with your wordpress theme with some instructions on how to customize that particular theme. Aside from that, here are a few things I wasn’t able to find in any Help or Read Me files.
Using SSI (server side includes) to implement Adsense, other javascript, or images on your site:
Why would you want to use SSI? It allows you to change which ad or picture you are using without having to edit your template every time. Plus, if you are using a javascript code on several websites, you can edit that file in your cpanel and it will instantly make that change on every page or website that uses that file as a reference for the code.
1 - Download Notepad ,because you will need it (or a similar program) to create these files properly. Do not use a word processing program.
2 - Copy the javascript code that you are trying to implement (adsense, commission junction, etc.) & paste it into a new Notepad document. Save it as html. (a separate document for each script)
3 - Upload it to the WP-content folder in your website’s Wordpress directory.
4 - From your cpanel (or your equivalent control panel) , click on File Manager, click on public_html, then navigate to the WP-content folder. Select the file that you just uploaded. On the right hand side, click on Show File. When the window pops up that corresponds to your file, highlight the address in the address bar of your web browser, copy it, and paste it somewhere for easy reference. (possibly a separate notepad document)
5 - Go to your Wordpress Admin - click on Presentation - Theme Editor - click on the file on the right side of the screen that contains the part of the template that you are trying to edit (such as a placeholder that says “your ad goes here”, or a banner, etc…), it will probably be in the Header or Sidebar.
6 - Locate the code that contains the placeholder you are replacing:
If it is between <li> & </li> ,highlight everything in the middle and paste the code below into that spot.
If it is a line that says <img src=………./> ,highlight the entire line including the < and the /> and paste the code below into that spot.
There may be variations of those codes, so you may also need to judge based on the file name the template is currently making reference to in order to or the text included in the code to find which line(s) you need to replace.
Or if there is no placeholder or image in the template that you are trying to replace, find the space where you would like to add it and paste it there.
Here is the code to use, just replace YourSourceAddress with the website address that you copied earlier, which goes directly to the file with your javascript code in it.
<?php include(’YourSourceAddress’); ?>
7 - Save the changes and you’re done. If you preview your website, you should see the change effective immediately.*
*If you just generated an adsense code, it may take up to 10 minutes for it to display properly.
*If you are using Firefox and you just see blanks where the ads should be, it may be due to your Firefox Add-ons. If you have AdBlock Plus installed, you may need to disable it and restart your browser. If you have No-Script installed, you may need to make sure that it is not blocking any scripts on your page. Or you can just view it in Internet Explorer.
Simple Color Changes
While still in your Theme Editor, click on Stylesheet. As you scroll down you will see some variations of: #111 or #FFF
Those make reference to colors. Unless you are pretty confident in your abilities, in which case you may as well just edit the whole stylesheet in a proper html editor & replace the original in that theme’s folder of your website (keeping a copy of the original of course)…. I would only edit something simple, such as the background color. Just make sure you have a backup first and foremost. Here is a chart that shows color codes: http://html-color-codes.com/ Just replace the numbers or letters in the stylesheet with the ones from the chart for the color you would like to try. Just don’t forget what they were originally, in case you want to switch back.
To Get Rid Of Large Blank Spaces In Your Posts
I’m not sure exactly what causes this to happen, something to do with the WYSIWYG editor I’m sure. But if you notice large spaces in the text of your font that are not shown in the Visual editor when writing your post, switch to Code view & look for the following line of code repeated on several lines with no text after it.
<p align=”justify”> </p>
<p align=”justify”> </p>
<p align=”justify”> </p>
Just delete those lines & it should fix the problem.
Changing Pictures Or Banners
You should have a copy of all the themes you installed already on your computer from when you originally downloaded them. Open the folder of the theme you are trying to customize and find the Images folder. Open the picture you are trying to replace with a photo editing program like Photoshop. You can use that as a template to create a new graphic or copy and paste an existing picture or banner you have over the original. That way you can manipulate it all you want, but as long as you don’t change the canvas size, you can be sure it will still fit into the template exactly the same way as the original file. Once you have it the way you want it, save it as a jpeg or bitmap image into the same folder, but with a different name. Then upload it to your domain using ftp or through the cpanel.
Then follow the directions above the “Using SSI…” section to replace the corresponding image on your site. This way, if you wanted to, you could just replace that file with another file with the same name & your site would be updated, without you having to edit any code in the template.
Rotating Affiliate Ads
Install the Ad Rotator plug in and follow the instructions provided. You will basically just create a new .txt file in Notepad, using one line for each script. Create a new one for each ad location, being sure to use different scripts in each file, so that they do not end up displaying the same ads at the same time. Once you have everything set up, the plug-in will randomly select an ad out of each of the text files every time the web page is loaded/refreshed.
Useful Plug-Ins For SEO (search engine optimization)
There are several plug-ins available at Wordpress.org that you may find useful. Make sure any plug-in is compatible with your version of Wordpress. Here are a few that I think are good to start with:
I hope this guide helps you get off to a good start. Feel free to let me know if you think there is anything else I should add that would be especially helpful for Beginners.
Have fun with your new blog :o)


February 7th, 2008 at 7:37 am
[…] MyTipsAndReviews.com ← Customizing & Adding Adsense To Your Wordpress Blog […]