Aweber - Email Marketing Made Easy
Full Width Navigation Menu in Thesis

Full Width Navigation Menu in Thesis

January 7, 2011 · 12 comments

in Thesis

Thesis 1.x Notice: Thanks for reading this post! So, here's the deal. I wanted you to be aware that this post was written prior to the release of Thesis 2. So that means the instructions or other information provided applies specifically to Thesis 1.x and not the latest 2.x version. Thanks!

This is an oldie by a goodie. You’ll find this code to create a full width navigation menu in Thesis on numerous respected blogs about Thesis, so there’s nothing new here. To give credit where credit is due, I probably first found this code on Kristarella’s site. But if you’re searching for a way to create a full width navigation on your Thesis site, you can get the answer here too.

Lately I’ve been using this more and more with websites I’ve been designing and building for clients, so I decided to make a post about it on my blog since I use it so often. It’s for those cases when you’re using the full width framework in Thesis and you want your navigation menu to extend the full width of the browser window. Kinda like you see on this site!

So here goes…

Step 1: The Function

Make sure you’re using the Full Width Framework setting found in your Thesis Design Options under “HTML Framework.” Now paste this code into your custom-functions.php file:

/* full width custom navigation */
function custom_nav() { ?>
<div id="nav_area" class="full_width"> 
	<div class="page">
		<?php thesis_nav_menu();?>
	</div>
</div>
<?php }

remove_action('thesis_hook_before_header','thesis_nav_menu');
add_action('thesis_hook_before_content_area','custom_nav');

This will remove the nav from the default position before the header and place it before the content_area div. If you want it to go before the header, use add_action('thesis_hook_before_html', 'custom_nav'); instead. The added div’s will also apply the full width class to it, so you end up with the code you need for a full width navigation.

Step 2: CSS

At this point, you can style it any way you want. You target the full width navigation using this css:

.custom #nav_area {background:#F0ECDB;}

I’m not going to get into all the ways you can style it, but now that you know how to target the navigation area, you can do any kind of styling you want.

Was this post helpful? Consider subscribing to my blog via RSS or

This Site Runs on the Thesis WordPress Theme

Thesis Theme thumbnail

If you're someone who doesn't understand a lot of PHP, HTML, or CSS, Thesis will give you a ton of functionality without having to alter any code. For the advanced user, Thesis has incredible customization possibilities via extensive hooks and filters. And with so many design options, you can use the template over and over and never have it look like the same site.

If you're more familiar with how websites work, you can use the fantastic Thesis User's Guide and world-class support forums to make more professional customizations than you ever thought possible. The theme is not only highly customizable, but it allows me to build sites with a much more targeted focus on monetization than ever before. You can find out more about Thesis below:

{ 12 comments… read them below or add one }

Ahmad Wali February 8, 2011 at 9:19 am

The given code is not working I am using full width framework. After inserting the code only nav menu showing before content, but not showing full width header!

Reply

Thesis-Blogs.com February 9, 2011 at 6:31 pm

The code isn’t supposed to show a full width header. It creates a full width navigation menu. I’ve used the code numerous times and it works just fine. Double check that you are following all the steps correctly.

Reply

Cal July 30, 2011 at 6:42 pm

Works great. Thanks!

Reply

phil January 8, 2012 at 4:18 pm

you might just want to mention that you need to change to full-width framework. not so unimportant, dude.

Reply

Thesis-Blogs.com January 8, 2012 at 7:30 pm

You mean these two lines in the post don’t make it clear enough? Seems kinda obvious, dude…

It’s for those cases when you’re using the full width framework in Thesis

Make sure you’re using the Full Width Framework setting found in your Thesis Design Options under “HTML Framework.”

Reply

rtnow July 23, 2012 at 10:10 am

Thanks – this is a simple but important thesis alteration that is surprisingly hard to find on the web.
rtnow recently posted..G.O.O.D. Music Covers August Issue of Complex Magazine

Reply

shuvo August 5, 2012 at 1:11 am

Hey it’s not working. plz help me
shuvo recently posted..How to add ‘Go To Top Button’ to Your WordPress Blog

Reply

Rachel August 20, 2012 at 1:31 pm

Just wondering, how could I get a nav menu like you have, without the divisions between each page?

Also, how did you make that neat curved strip at the bottom of the nav menu?

Thanks!
Rachel recently posted..How to Make Sure You Don’t Have a Summer from Hell

Reply

Thesis-Blogs.com August 20, 2012 at 1:35 pm

The nav menu is just a standard WordPress menu. Nothing special there. As to the background of the menu, that’s an image that is repeated along the x-axis. It’s styled that way using css.

Reply

Rachel August 20, 2012 at 11:46 pm

Would you be willing to share the code for how you did the background? I’m still very new at coding.
Rachel recently posted..3 Tips On How to Start the School Year Off On the Right Foot

Reply

Thesis-Blogs.com August 21, 2012 at 8:25 am

The code is there for you to take a look at. What I’d recommend is that you use Firebug to inspect that element of the page, and it will show you both the HTML and the CSS used to create the design. http://getfirebug.com.

Reply

Rachel August 21, 2012 at 10:06 am

Thanks! I’ll try and see if I can do it.
Rachel recently posted..3 Tips On How to Start the School Year Off On the Right Foot

Reply

Leave a Comment

When commenting, you can use basic HTML tags. If you are pasting in any code, please escape it here and then include that code within <pre></pre> tags. Thanks!

CommentLuv badge

Previous post:

Next post: