125×125 Ad blocks for your WordPress Sidebar

Posted on 9:43 am 

Well I wasted my time with all of this crap. Shortly after implementing this (only a couple days) I found a plugin to do it for me. Creates 125×125 ads and auto-spaces them to fit in your sidebar. It also tracks clicks. Argh! What a waste.

While customizing this site I decided to add a block of 125×125 banner ads in my sidebar.  This feature was not included in the theme I am using and I had to add this myself using CSS.  I am not a designer by any means so I searched Google for a WordPress theme that already had that feature and I just took the CSS code for it and added it to my blog.

Im going to share the method for doing this because this morning I found a visitor to my site who came here via Google when searching for how to add this exact feature.  To do this you must have access to your theme files to edit the stylesheet otherwise it will not work properly.  The theme I used the css from was SlickBlue.

I downloaded the theme and edited the stylesheet.css and adblocks.php files and removed the following code:

stylesheet.css

.sidebarbuttons {
width: 265px;
padding: 5px 10px 5px 10px;
margin: 0px 0px 10px 3px;
}

adblocks.php

The file ad.jpg is a sample image that can be used as a filler until you fill all your ad spots.  Copy the stylesheet code to your theme’s stylesheet.css file and copy the adblocks code to your sidebar.php file where you want the ads to appear or if your theme uses widgets you can insert that code into a widget.  All you need to do is replace the images and links with your own ad code.

For help with positioning and using Widgets you can visit my previous article on how to place widgets anywhere in your blog.

Digg it StumbleUpon del.icio.us Google Yahoo!

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

4 responses to “125×125 Ad blocks for your WordPress Sidebar”

  1. Web Design Ealing (2 comments) says:

    Thanks for this, I’ve been looking for something simmilar for a while now. I was surprised to find that there were no plugins for this, I did find something called CustomWidgets plugin, that’s the closest anything came to it.

    Thanks
    Sunny

  2. Creative Design Agency (1 comments) says:

    Thanks for posting this, I've been looking for a good ad creator and I was dreading having to do it myself as I'm clearly not as up to speed as you appear to be. Thanks for the extra information too, it's helping me learn various bits and pieces.

  3. Joel (2 comments) says:

    Dan, Another good option is to sign up with buysellads and place code. Visitors can buy and put ads. Everything is almost autopilot with that. I love that once

  4. Website Seo Services (1 comments) says:

    I just need some quick help with my wordpress blog. My sidebar is showing up at the bottom of the page after my posts. I don't know how to get it back to it's normal place.

Leave a reply

Comments links could be nofollow free.