Jump to content
Sign in to follow this  
jwood252

Secondary Navigation for entire site

Recommended Posts

jwood252

Hi, I've been wanting to implement the Secondary Navigation but I know it now has to be applied in the Meta options for each page. Is there any easy way to implement the Secondary Navigation for my entire site without needing to go to every page and enable it individually? Like a line of code that can be added? Thanks in advance!

Share this post


Link to post
Share on other sites
Guest Guest

Are you using 1.3? You can now add the secondary nav section to the site header template in the template setup section and that will allow you to always display it in the header.

Share this post


Link to post
Share on other sites
jwood252

I'm currently on 1.3.2, I tried adding it to the header section but it only shows on my homepage and not the rest of the site. Is there an option to enable for that to show for the entire site?

Share this post


Link to post
Share on other sites
bryan-hadaway

There are different headers, are you sure it was the site-wide header? Can we get a screenshot of your settings? Thanks, Bryan

Share this post


Link to post
Share on other sites
bryan-hadaway

Marking for developer review. Thanks, Bryan

Share this post


Link to post
Share on other sites
cmunns

This is because each page needs to be set to show whichever menu you want. It's meant to be more flexible, but isn't great for showing on the global level. Your best bet is to create another navigation section that is more like the primary nav.

Share this post


Link to post
Share on other sites
jwood252

How would I go about creating another navigation that's separate from the primary nav? I have the second menu created in WP menus, just not sure how to add it to either above my logo or above the banner below my logo so that it shows for the whole site.

Share this post


Link to post
Share on other sites
cmunns

You could use a hook like this, add it to your functions.php file ` add_action ('pagelines_after_branding','sub_nav'); function sub_nav(){?>

<?php wp_nav_menu( array('menu_class' => 'secondnav_menu lcolor3', 'menu' => 'Menu Name', 'container' => null, 'container_class' => '', 'depth' => 1, 'fallback_cb'=>'pagelines_page_subnav') );?>
` Match the menu name to the one you created.

Share this post


Link to post
Share on other sites
Andrew

We've had a few requests for something better as a callback on second nav; we will improve with updates.

Share this post


Link to post
Share on other sites
jwood252

I tried adding the code to my functions.php and replaced 'Menu Name' with 'Top Menu', my secondary menu, but ended up getting an error - Parse error: syntax error, unexpected $end in /home/jwood252/public_html/wp-content/themes/platformpro/functions.php on line 27 Is there another option than needs to be enabled first for the secondary menu to work? Thanks in advance!

Share this post


Link to post
Share on other sites
cmunns

No I just didn't paste the whole code. Add this to the end of what I pasted above: `<?php }`

Share this post


Link to post
Share on other sites
jwood252

Thank you so much for your help so far. Sorry to be a pain but would you happen to have a modification to that code to get the secondary nav to be placed above my logo? Like here. Thanks again!

Share this post


Link to post
Share on other sites
catrina

You'll have to use a different hook in the functions.php file, which is probably pagelines_before_branding instead of pagelines_after_branding.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

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  

×