Jump to content
Sign in to follow this  
basmati

Secondary Navigation

Recommended Posts

basmati

Hi, i need to register a small secondary navigation bar within the header of pagelines right beside the branding. Any ideas for a clever hook for the functions.php?

Share this post


Link to post
Share on other sites
basmati

OK. This hook registers a secondary-menu in the backend. But now i need the second menu to be on the right hand beside the branding. Any ideas?

add_action( 'init', 'register_my_menu' );
	function register_my_menu() {
		register_nav_menu( 'secondary-menu', __( 'Secondary Menu' ) );
	}

Share this post


Link to post
Share on other sites
cmunns

Hey Peter. Nice going. You should be able to do a float:right but i'd need a link to your site to confirm it.

Share this post


Link to post
Share on other sites
basmati

its still offline on my mac testing it with mamp :-) Im using: PlatformBase 1.0.3 + WP-PageNavi Plugin for creating different Menus - i created one for the primary navi and a second one for a small navi beside the branding. After implementing the hook above, the "secondary menu" OPTION shows up in the menu area in the wordpress backend - i now can choose a prepared menu here. But nothings changes on the frontend - no second menu appears. Do i have to add code in the section.nav.php? Thanks!

Share this post


Link to post
Share on other sites
cmunns

Yes, you would have to create a space for it in the branding section if you want on the same plane as the header image. You'll see an example in the section.nav.php of how navigation works in conjunction with what you have already done. Feel free to share more code so I can advise further

Share this post


Link to post
Share on other sites
basmati

Thanks Adam, i'll try that and report later. By the way: In Thesis theme you have an admin section in the backend where you can decide in which DIV you want to place navigation-menus! That would be a "push over the cliff" - for the Platform theme - don't you think?

Share this post


Link to post
Share on other sites
Andrew

Hey Peter, What is the option in Thesis you speak of, how does it work, and does it work well?

Share this post


Link to post
Share on other sites
basmati

Yes Andrew, but it's not thesis, it was hybrid... I just found the info about menu placement in DIVs on this blog: http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus Search within the article for: "Displaying a menu using the Navigation Menu widget" A picture: navigation-menu-widget.png I have no experiences with Hybrid - just read about it. But it sounds good! Greetings, Peter

Share this post


Link to post
Share on other sites
basmati

I'm learning php and have good knowledge in xhtml and css (some Javascript) - so, a lot of things concerning php are still strange and difficult to me. Could you please just give me a few more hints for the coding? I found also this post on the forum: http://www.pagelines.com/forum/topic.php?id=3055

Share this post


Link to post
Share on other sites
cmunns

Peter, responded to the other thread and it should work as I tested it first, but if you wanted to add a nav location to the branding section you could do that as well using info from the article above. Where are you in the process?

Share this post


Link to post
Share on other sites
basmati

A little bit lost ... in "section.nav.php" i copied the following code line and changed primary into secondary:

register_nav_menus( array( 'secondary' => __( 'Secondary Navigation', 'pagelines' ) ) );

The WP backend now shows a dropdown menu and i can choose a prepared menu for the "Secondary Navigation" there. Now - how can i create

a space for it in the branding section ... on the same plane as the header image
Can you give me a few more details?

Share this post


Link to post
Share on other sites
basmati

Actually - would it be possible to create a second navigation bar with the same features as the Mainnavigation (Dropdowns/Flyouts) on the right side of the branding?

Share this post


Link to post
Share on other sites
cmunns

Alright, try and undo whatever changes you made to the section.nav file. If you want something to the right of the branding, duplicate the section.branding.php into your base customization theme. This will make your custom changes safe. THen we can insert a new menu location and style it.

Share this post


Link to post
Share on other sites
basmati

OK, thank you very much. I duplicated the section.branding.php and put it in the platformbase folder. Can you please help me inserting this new menu location?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×