You are here: Computer Video TutorialWordpress TutorialNavigation Above Twenty Ten’s Header
Due to regular updates on WP, if you look for Twenty Eleven theme modification or customization tutorial, first of all, first check this post. Thanks.

Navigation Above Twenty Ten’s Header

by Kimi on September 21, 2010

How to move navigation menu bar of Twenty Ten theme from under to above the header image.

One of my commenter asked, if we can possibly move Twenty Ten navigation menu bar above the header image.

We can do it, however, when you have a drop down menu, part of header’s image will be gone when you hover on the menu.


Video:

So here are the steps to move the menu bar above the image.

The end result.

1. Dashboard, Appearance, Editor.

2. Open header.php file. Copy the code to notepad++
blog seo

3. Find around line 73, which has this line of code:

<div id="access" role="navigation">
<?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
<div><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!-- #access -->

Image:

From div "access" until the closing div.

Select the code from the beginning until the end of the “div”, and then “Cut”

4. Paste those codes right after the end of the “site-description” div (see image)

Where you will paste the code back.

5. Select all the code and paste the code back in to “header.php”
6. Update the file.

And if you refresh your browser, the navigation bar should be above the image.

Subscribe new tips via Email:

Was the post helpful? Share it to help others with:

{ 15 comments… read them below or add one }

Sathish @ TechieMania September 25, 2010 at 3:55 pm

Hi Dina, This is my first visit to your blog and I am impressed. You are doing an amazing work.

Thanks for this Twenty Tutorial. It would be helpful for the newbies.

Sathish

Reply

Dina September 25, 2010 at 5:30 pm

Welcome Sathish :D

Thank you for your nice encouraging comment, yes, i hope twenty ten tutorials in this blog will help other newbies.

Reply

shashank chinchli September 30, 2010 at 1:23 am

i endedup doing the same on my blog :)
N yea ur last line of blog made me think twicebefore doing so !

Lines are “I and My blog ……r website or you”

Reply

Dina September 30, 2010 at 7:02 am

Hey Shashank,

Yes, if you’re not sure it will work with your site, best is to install wp locally and try it local first then apply it online.

Thank you for coming by ;)

Reply

Hans October 12, 2010 at 6:57 pm

Hello, Hans here,

My question is: (How) Can the homepage get the textname of the header of the page? Or is this not possible?

Thanks for the great info

Hans

Reply

Dina October 12, 2010 at 11:16 pm

Hello Hans,

Do you mean changing the “Home” wording on the top navigation to something else? if yes, it is in function.php, i will make a tutorial in the next days.

I hope it will help.

Reply

Hans October 13, 2010 at 9:01 am

Yes, correct, the word ‘Home’

Reply

Dina October 13, 2010 at 1:28 pm

Great! I will publish the post tonight or tomorrow Hans.

But for your reference, if you have a business website, you may want to put a welcome page in front, and the post page can be called blog. If you are interested on applying this, this post may help: http://www.blog.web6.org/wordpress-change-home-page/

Reply

Dina October 13, 2010 at 7:59 pm
Fred February 2, 2011 at 3:46 pm

Very nice tutorial. You’re my new hero!

Reply

Kimi February 4, 2011 at 7:02 am

Hi Fred,

I am glad it was useful for you.

Thanks for your nice words!

Kind regards,

Kimi.

Reply

Jerry Lee May 18, 2011 at 7:22 pm

Another option is to just update the stylesheet:
#header #access{
top: -240px;
position: relative;
}
#site-title {
margin:0 0 44px;
}

Reply

Jerry Lee May 18, 2011 at 7:23 pm

Or update the styles…
[code]
#header #access{
top: -240px;
position: relative;
}
#site-title {
margin:0 0 44px;
}
[/code]

Reply

James June 8, 2011 at 11:02 am

^ Nice one Jerry, that worked for me!

Reply

Jaspinder grewal March 2, 2012 at 2:00 pm

thanks man,… i really needed to move the navi bar…

Reply

Know better? Feedbacks, or Questions? Shoot! :-)

Please use a name instead of blog name or SEO stuff, otherwise it will be deleted right away.

About checkbox → See more my post:how to get rid of spam bots in wordpress post.

Thank you for visiting, you're always welcomed to be here again!

Previous post:

Next post: