How to add additional navigation menu in thesis theme?

In every website, the navigation menu is the first look to visitors. So every one wants to design the header in simple and attractive. In default, thesis has one navigation menu. When you want to add more tabs in the navigation menu the first line will fill and it occupy the second line also. Due to one extra tab, it occupies more space in header and which seems in unfinished format. So to make the all the tabs in first line I decided to reduce the font size of each tab and it fill the first line but it looks tiny. Then, what is the solution to solve this? I realized myself and I decide to add one more navigation menu and I want to share with you. If you also came across this situation, I hope it will helpful for you. So, in this post you can learn how to add additional navigation menu in thesis theme.

I made the two navigation menus in my site. In this  video I explained step by step how I add additional nav menu in thesis theme. If you can’t watch the video, don’t worry, keep reading rest of this post.



How to add two navigation menus in thesis theme?

To do these go to custom file editor and select custom_function.php

Paste this code to custom_function.php

/* to change default nav menu below header*/
/*paste in custom_function.php*/

remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');

/* Add the second navigation menu */
/* paste in custom_function.php  *******/
/* Links for top menu will need to be manually added here, since this menu isn't supported by Thesis */
function secondnav_menu() {
?>
<ul id="topnav_menu">
<li><a href="http://adwordsshop.com">Home</a></li>
<li><a href="http://adwordsshop.com/about">About</a></li>
<li><a href="http://adwordsshop.com/category/testing">Testing</a></li>
<li><a href="http://adwordsshop.com/category/softeware">Software</a></li>
</ul>
<?php
}
add_action('thesis_hook_before_header', 'secondnav_menu');

To style your navigation menu copy and paste this code to custom.css. you can customize this style sheet as your own requirement.

paste this code to custom.css

/* paste in custom.css file */

.custom ul#topnav_menu {
border-style: 2px solid #111;

background:#E4E4E4 none repeat scroll 0 0;
width: 100%;
float: left;

}

.custom ul#topnav_menu li { float:left; padding: 3px 5px 3px 5px; border:1px solid #111;}
.custom ul#topnav_menu li a { font-size: 1.3em; line-height:2em; color: #000000;background:#12cfff; }
.custom ul#topnav_menu li a:hover { color: #ff0000;baground:#eee; }

Here I want the default navigation menu below the header and new navigation above the header so I coded in custom_function.php which is in blue color. If you want the new navigation below the header you have to rename the before as after in this blue color line.

Now, you will see the two navigation in thesis theme.

Double navigation

I hope you enjoy this reading and I want to know what you think about this double navigation menu. In your site are you using single or double navigation menu? Which one do you like? Share your thoughts here. For more checkout our all Thesis theme tutorials..

{ 31 comments… add one }

Leave a Comment

  • Sushant @ techooze January 5, 2010, 11:39 PM

    This blog looks more like a thesis customation guide. Nicely done.

    Reply
  • aviationMY January 8, 2010, 9:11 PM

    hi,

    how to remove the bullet?dots in the left before the nav bar..

    and how possible if i want this trick to be in normal nav, nor additional nav bar..how to make it?

    thank you.

    Reply
  • Pascal January 8, 2010, 11:00 PM

    To remove bullets replace this below line in custom_function.php
    id=”topnav_menu”
    with
    class=”menu”

    now your new nav menu similar to default nav menu.

    Bullets makes bad look on nav. better to avoid it.

    Reply
  • Suresh February 18, 2010, 11:32 PM

    hai vivek,

    for your question.
    In the custom functions.php code mentioned in this post remove first two line
    remove_action(‘thesis_hook_before_header’, ‘thesis_nav_menu’);
    add_action(‘thesis_hook_after_header’, ‘thesis_nav_menu’);

    The last line change the hook name ‘thesis_hook_before_header’ into ‘thesis_hook_before_header’ you will get default navigation above header and additional navigation below header image.

    Reply
  • Alison Moore Smith January 6, 2011, 10:37 PM

    The last paragraph in Suresh’s response has an error. It should read:

    The last line change the hook name ‘thesis_hook_before_header’ into ‘thesis_hook_after_header’ you will get default navigation above header and additional navigation below header image.

    Reply
  • Suresh February 20, 2010, 11:20 AM

    thanks…

    Reply
  • Tia - BizChickBlogs.com April 29, 2010, 11:40 AM

    This is perfection. Thank you!

    Reply
  • Amit kumar May 3, 2010, 5:04 AM

    sice the topnav_menu is an id but you saying to put “class=menu ” so does we have to change in custom.css to “.menu ” i don’t have bullet removed ..please help

    Reply
  • Suresh May 3, 2010, 9:59 AM

    hai Amit,

    Give you site name…because we should do some changes in css code to fix nav menu according to your web page design. If you take any code from online you should do some css changes to fix in our web page. if name is id we should use #before the id name in css. The name is in class we should use . before the name..

    Reply
  • Shan @ Last Shreds Of Sanity May 9, 2010, 6:43 AM

    This did not work for me. I did what you said about removing the bullet, but then it make the top nav turn into a bulleted menu. I also now have TWO default nav bars below the header.

    You can see that here: http://lastshredsofsanity.com/wp-content/uploads/2010/05/MLT-Top-Nav-Not-Working.png

    Please help?

    Reply
  • Suresh May 9, 2010, 8:00 PM

    hai Shan,

    check your custom.css code.. all the codes are available are not.. give your site name to find your issue…

    Reply
  • Cheri Peoples June 20, 2010, 8:16 AM

    will this work in thesis 1.7

    I have been trying to do your tutorial on adding background images in thesis theme nav menu and it keeps shuting down my site and I have to have it reloaded. Is that because I have 1.7 and if so what do I need to do differently ??

    Cheri (www.diyclubinc.com and http://www.itssoverycheri.com)

    Reply
  • Pascal June 20, 2010, 10:43 AM

    Hi It will work in Thesis 1.7 also.

    The error due to any code missing.

    Again copy the code & try it.

    Reply
  • Cheri Peoples June 23, 2010, 11:04 PM

    I copied it and pasted it for this tutorial and it shut my site down again–why

    Cheri

    Reply
  • Suresh June 23, 2010, 11:14 PM

    hai Cheri,

    I think you may missed semicolon or closebraze at the end..
    check this code in custom_function.php file via ftp.

    Reply
  • Cheri Peoples June 24, 2010, 3:41 PM

    I copied the entire code and pasted the entire code, how would I miss a semi colon or close braze?

    I had already watched the thesis video and had moved my nav bar below my header, is that part of the problem (duplicating the same code, since that action has already been done?)

    If you have any suggestions you can e-mail me directly at cheri@itssoverycheri.com

    I really want to do both tutorials moving the header to both above and below my nav bar and then also adding the custom nav bar but both crash the site when I copy and pate.

    Would it be better to do one before the other?
    Thank,
    Cheri

    Reply
  • Pascal June 27, 2010, 3:04 PM

    now i see your nav above and below the header.

    Reply
  • Mary August 11, 2010, 5:44 AM

    I would love to add an additional nav bar under the current nav bar on my page. I would like the second nav bar to be “thinner” (as in not as tall) than the first nav bar. I would also like to try to match the color to the green color on the side of the page. I have no clue.

    Is there any way you can help me with this? Thanks a million (in advance)!

    Reply
  • Pascal August 11, 2010, 7:43 AM

    Hi mary,

    Our thesis team totally move to our membership site fourbloggerclub. so nowadays we are solve any single thesis issue for $$ only. it is ok for you. send your requirements.
    contact us via contact form

    Reply
  • brock October 26, 2010, 3:22 PM

    Thank you very much. You rock.

    Reply
  • Oren December 18, 2010, 3:04 PM

    Hey Suresh.
    for some reason the tabs are not clickable…
    maybe you can check it out.. :)
    thanks..

    Reply
  • Oren December 18, 2010, 3:25 PM

    well, now i see it’s clickable in IE8 but not in FF…

    Reply
  • Oren December 18, 2010, 3:27 PM

    and is there a way to make this menu act like the default menu ?
    i want to change the gap between the tabs..

    and is there a way to add a different image to each tab ?

    thanks :)

    Reply
  • Alison Moore Smith January 6, 2011, 10:39 PM

    Very helpful post. I’m trying to tweak it to fit one of my sites. I’ve looked at a number of similar 2nd nav codes and this is the best one I’ve found. Thank you.

    There is one error in the custom.css code. The last line says this:

    color: #ff0000;baground:#eee;

    It should read:

    color: #ff0000;background:#eee;

    Reply
  • Rohit January 26, 2011, 5:30 PM

    hay thanks…..

    Reply
  • The Trible Tattoos January 27, 2011, 7:46 AM

    This article is kick-ass. It adds functionality to the already full of bells and whistles thesis theme. I bookmark this for my future reference.
    Thanks a lot to the poster.

    Reply
  • Amandeep Singh July 16, 2011, 8:45 PM

    Awesome stuff.. helped me in adding an additional nav menu just the way i wanted.. Thanks a lot for sharing :)

    Reply
  • Tim August 9, 2011, 7:39 PM

    how do i make the second nav menu to show current state? For example if a user clicks on about it will show they are currently on the about page.

    this code is for my main nav menu:

    .custom ul.menu .current a { color:#1C7519;}

    but i can’t seem to figure out a code for the second nav menu.

    Reply
  • sunil September 25, 2011, 9:36 PM

    Hi , i tried doing this . It worked but as soon as i cleared my caches it doesn’t work anymore :( ..please can you tell me what do i do next?

    My another navigation menu i.e category menu which i have put in after header went above the header and pages vanished which i had put in above header . Please help me :(

    Reply
  • Emily December 29, 2011, 7:03 AM

    Thanks for that…I’ve been wanting a second navbar; didn’t know I could do it in Thesis ’til the Thesis creator mentioned it on his blog.

    My DH struggled a bit with the process (he’s the geek, I’m the IMer), but now we’ve got it up and running.

    Reply
  • graham June 21, 2012, 6:34 PM

    cheers for this m8 have been trying to activate the menu option in my wordpress theme for the past few hours, thought i was gona be stuck with having to edit the menu in my websites html every time i needed to add or change a nav.

    Reply