Jump to content


Photo

How to move primary nav to header area


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 buzzdeep

buzzdeep

    Member

  • Members
  • PipPip
  • 25 posts

Posted 08 November 2010 - 06:01 PM

Can I have a simple function that moves primary nav to header/branding area?

I am trying this:

 add_action('pagelines_before_branding_icons', 'add_topnav_menu');
	function add_topnav_menu() {
		wp_nav_menu( array('menu' => '$menu' ));
	}

and it posts the nav bar inside header, but it loses all CSS and so, display it vertically. How can we keep intact the entire nav bar?

#2 buzzdeep

buzzdeep

    Member

  • Members
  • PipPip
  • 25 posts

Posted 09 November 2010 - 04:00 AM

anyone?

#3 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 09 November 2010 - 05:23 AM

Forwarded to developers. Thanks, Bryan

#4 arpowers

arpowers

    Founder

  • Administrators
  • 3252 posts

Posted 09 November 2010 - 07:02 AM

Hmm... well it looks like you're getting there... There are two good approaches to this. 1. Use a hook (like you did ) 2. Create a custom section (in the child theme) ** To get the styling you're looking for you're going to need to apply the same CSS classes given in the section.nav.php file. namely: `wp_nav_menu( array('menu_class' => 'main-nav'.$additional_menu_classes, 'container' => null, 'container_class' => '', 'depth' => 3, 'theme_location'=>'primary', 'fallback_cb'=>'nav_fallback') );` just start by using that with your hook :)