WordpressWordpress SetupWordpress Themes

How to Add a Banner Ads to Thesis Header

Thesis Tutorial: I wanted to add a banner ad to the Wordpress Thesis theme header and I looked in the usual spots like the index.html file or the template.php file but the Thesis theme is different from all other Wordpress themes.  You need to add hooks in the css file and custom_template file.  It was a really long procedure to learn how to add the banner but it turned out to be really easy.  Here is how I finally managed to do it:

1.  Login to your ftp manager.

2.  Go to your Thesis Theme Custom folder –  wp-content/themes/thesis/custom

3.  Edit the file ‘custom_functions.php’ and add the following lines:

function my_header_banner_ad() { ?>
<div id=”header_banner_ad”><a href=”insert your thesis header banner ad link here”></a></div>
<?php }
add_action(‘thesis_hook_header’, ‘my_header_banner_ad’);

4.  Save the file.

5.  Edit the file ‘custom.css’ and add the following line:

.custom #header_banner_ad { float: right; position: absolute; width: 468px; height: 60px; top: 40px; left: 552px; }

6.  Save the file.

If the banner is not positioned well on your site, you can modify the values in the ‘custom.css‘ file.    To change position of the banner vertically:

  • modify the ‘top’ value.  See the 40px?  If you make the number higher, the banner will move down.  If you make the number lower, the banner will move higher.  ie.  if  top: 0px, the banner would be touching the top of the window.

To modify the position of the banner horizontally:

  • modify the ‘left’ value.    See the 552px? If you made this number higher, it will move the banner to the right.  If you made the number lower, the banner will move to the left.  ie.  if left: 0px, the banner would be touching the left side of the window.
  1. Anna

    Hello, I have the thesis 1.8 theme and I somewhat am trying to customize it, I moved the menu nav to be below the header/banner—I have 5 menu tabs–my question, is it possible to have a different header jpg per each page/tab—I have the one on the homepage which is throughout the site, but if someone clicks on the about us tab, I would like to have a different banner jpg display, I would appreciate any help offered.
    Thank you in advance

  2. canon legria fs 200

    Thanks for the tutorial “how to add banner to thesis header”.
    But, i have a question. How to add my affiliate link to the banner?
    I mean, when someone clicks the banner, banner will be open new window that go to my affiliate link.

    Thanks before for your help



Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload