Add a Header Widget to Thesis

January 12, 2010 · 13 comments

in Thesis Tutorials

My last two free Thesis Skins (Sharp and Terracotta) have included an area in the header for adding banner ads, social media icons, and other content. Here’s a quick video tutorial on how you can add a header widget to your Thesis Themed site that will allow you to add content to your header directly from the widgets panel.

The code used in the video can be found below the video and can be copied and pasted into your custom_functions.php and custom.css files.

Code for your custom_functions.php file

Text File including the following code for copying and pasting

This code builds a 3rd widget titled HeaderAd to your widgets panel and ‘hooks’ it into the header. You’ll need to add the code below to your custom.css file to position the new widget properly.

Code for your custom.css file

.custom .sidebar ul.sidebar_list {position: relative;}
.custom #header_widget_1 ul.sidebar_list li.widget {position: absolute; display: block; top:0px; left:477px; width:468px; }

You’ll most likely need to adjust the left and top attributes to appropriately position the banner based on your column and width settings. In the tutorial, I used the page framework and the two column layout with a main column with of 600px and a sidebar column width of 300px.

I also used a 468×60 banner in the tutorial so if your using banners of different sizes or multiple social media icons, the width attribute may also need to be adjusted.

Hope you enjoy the tutorial and please feel free to leave a comment with any questions or feedback you may have!

{ 13 comments… read them below or add one }

Oscar January 14, 2010 at 9:23 pm

Very cool tutorial, I’ve been looking for a way to do this. I have to try it and see if it works, I’d like to be able to add some widgets to the header section on some of my sites.

Reply

Chris January 14, 2010 at 10:14 pm

Oscar – Thanks for the feedback. Give it a go and let me know if you need any help along the way!

Reply

DJ January 15, 2010 at 5:08 pm

Would it be possible to make this RSS sign up form go in a header widget like th one you have: http://www.agentpress.com/demo/ . Also, do you do any freelance work…I’m trying to make a kick ass site using Real Estate site using Thesis :) ?

Email me if you are interested??

Reply

Chris January 16, 2010 at 2:12 am

Yeah, you’d just need to copy the RSS code into a text widget. Some additional CSS styling might be needed to get the right look, but the header widget can be used to put all types of content up in the header area.

I do some freelance work on occasion but I’m currently tied up with several other projects so I’m not taking on any design work for the time being. Thanks for asking though :) You might want to check out the classified ads over at the Thesis forums to get hooked up with a designer specializing in Thesis.

Reply

Dennis January 21, 2010 at 11:47 pm

Hi… just started with your cool skin… terracotta. A couple of quick questions… the frame on my photos show up white and not with the cool border on your demo. How do I fix this And is the drop cap feature something I have to code in each post?
Thank you.

Reply

Chris January 22, 2010 at 2:25 am

Hey Dennis – Adding frames to your photos in Thesis requires you to add just a bit of html to your image code. Check out the How to Style Images in Blog Posts page from the Thesis User’s Guide for more info.

As far as I know, you do have to manually code in each post. The Publish Like a Pro with These Styling Tips page from the User’s Guide provides some more details.

Thanks for giving my skin a try! Terracotta looks nice on your site!

Reply

Jaxrolo January 27, 2010 at 3:43 pm

Thanks for the Tutorial. I had been looking for a way to do this.

Reply

Bob January 30, 2010 at 1:07 pm

Chris,
Thanks for that! It worked perfectly!
Bob

Reply

Alan February 1, 2010 at 10:02 am

I have added the custom functions and css. I have now the side bar box in the header. Went to the widgets area and added a text box to the headerad and I can get it to appear. I am running a two column. Should it be on 3?

Reply

Jacob Margolis February 16, 2010 at 3:16 am

Thanks for the tutorial! I’m enjoying working with thesis and your website has helped a bunch.

Reply

Jeff February 25, 2010 at 3:21 pm

*Confused*
if i want to place 728×90 which part i must change?

Reply

Chris February 25, 2010 at 5:20 pm

Just the css attributes for the header widgets, specifically these:
top: 0px; left: 477px; width: 468px;

Reply

Shubham March 1, 2010 at 8:26 am

thanks for the widgetized header…!

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>