How to display 125 x 125 Ads in Sidebar of Thesis Theme?

by Harshad on October 16, 2009

The Thesis Theme from Chris Pearson and DIYthemesThesis WordPress theme is popularly known for its customization ability. It allows bloggers to create versatile designs from its simple design. This feature of Thesis theme is quite efficient as blogger can use single theme over different blogs by just tweaking it here and there.

Thesis customization is not as easy as it sounds. I have written tutorials on how to add twitter field and how to add favicon in Thesis theme, which requires technical knowledge of WordPress. Today, I am sharing another tutorial to include 125 x 125 advertisement blocks in sidebar of Thesis theme.

In order to put ad blocks of this size, you will have to edit custom_functions.php and custom.css files of your theme. Thesis theme doesn’t offer flexible advertising options. We can only display certain types of ads on blogs, but the ultimate solution for this problem is customization.

125 x 125 Ad Blocks in Sidebar of Thesis Theme

Let’s start with customization of Thesis theme.

  • Open Custom.css file and add following code in it.
.custom .ads
{
	text-align: center;
}
.custom .ads img
{
	margin: 1px;
}
  • Save the file and open Custom_functions.php
  • Copy following code and paste it in the file.
function custom_ADS()
{
?>
<div class="ads">
<a href="Add_Link"><img src="Add_Image_Source" /></a>
<a href="Add_Link"><img src="Add_Image_Source" /></a>
<a href="Add_Link"><img src="Add_Image_Source" /></a>
<a href="Add_Link"><img src="Add_Image_Source" /></a>
</div>
<?php
}
add_action('thesis_hook_before_sidebars', 'custom_ADS');
  • Save the file. That’s it!

If you want to show these ads in other sidebars then you can change the sidebar from thesis hook.

Advertisement

125 x 125 ads

Related posts:

  1. How to display Ads in Single Post of Thesis Theme?
  2. How to Remove Comments from Homepage of Thesis Theme?
  3. How to Add your own Logo in Thesis Theme?
  4. How to display Categories in Thesis Nav Bar?
  5. How to Add Twitter Field in the Comment Section of Thesis Theme?

{ 10 comments }

Rahul October 19, 2009 at 9:04 pm

Nice, tips about 125*125 bar. Can we use this for other themes also.

Harshad October 20, 2009 at 9:44 pm

Yes, you can also include 125 x 125 ad block on other themes too. You just have to edit CSS file and sidebar.php file of your theme. :)

ProMomBlogger November 5, 2009 at 10:09 pm

how do I get it to show up on my home page?

the code works fine on everything else BUT the homepage. Can you please help me!!!!!

ProMomBlogger November 6, 2009 at 12:03 am

Nevermind…. its working now. You ROCK! Do you know how long I was searching to code instead of the typical (and often slow) plugins?

Keep it coming dude. I would love to know how to add an Opt-In form in the header with my logo/header.

Notilogia November 22, 2009 at 8:00 am

You, youu, youuu, you are the man son !!!
I finally made in three easy steps

Harshad November 22, 2009 at 12:49 pm

Wow, that’s cool. ;)

David December 9, 2009 at 10:20 pm

Some cool guides here , thanks Harshad.

How can I place ads elsewhere using hooks rather than editing php templates?
kind regards
Dave

Harshad December 13, 2009 at 9:30 pm

You’ll have to write your own code.

Aaron December 10, 2009 at 2:37 am

What would keep this from showing up on my pages? I inserted the code into the custom_functions.php file and nothing at all on my page changes. I tried inserting




using openhook and that didn’t work either. Is there a setting somewhere that I have to change to get this stuff to work? I’m so frustrated right now.

Harshad December 13, 2009 at 9:26 pm

Please share your website here so that I can take a look at it.

Comments on this entry are closed.

blog comments powered by Disqus

Previous post:

Next post: