- This topic has 3 replies, 2 voices, and was last updated 9 years, 2 months ago by Andrew Misplon.
Tagged: edit menu header sticky menu ultra
- AuthorPosts
- September 30, 2015 at 10:30 pm #2469
ForestyuraParticipantI creater two menu in header,one below the other. How can I add a second menu in the sticky menu?
September 30, 2015 at 10:31 pm #2470
Andrew MisplonKeymasterHi Forestyura
Thanks for reaching out.
How have you added a second menu to the header? What method did you use to achieve that?
October 1, 2015 at 9:15 am #2471
ForestyuraParticipantI add menu in function.php:
register_nav_menus( array(
‘secondary’ => __( ‘Top Bar Menu’, ‘ultra’ ),
‘top-bar-social’ => __( ‘Top Bar Social Menu’, ‘ultra’ ),
‘primary’ => __( ‘Primary Menu’, ‘ultra’ ),
‘footer’ => __( ‘Bottom Bar Social Menu’, ‘ultra’ ),
‘secondprimary’ => __( ‘Second Menu’, ‘ultra’ ),
) );
, and added a menu block in header.php
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>October 1, 2015 at 11:33 am #2473
Andrew MisplonKeymasterThanks for the update.
These sorts of changes are quite far into the custom development territory so not really part of normal theme support. We’ll do our best to advise.
A friendly reminder to work from within a child theme to keep your changes update safe. All WordPress.org themes completely overwrite their own folders during the update process. If you make changes to the parent theme and run a theme update, all changes will be lost.
More about child themes
A starter child theme for UltraOnce you’ve registered your menu in the child functions.php file, make a copy of header.php and insert it in the child theme folder.
Next go to /inc/template-tags.php and locate line 129. Copy that entire function into your child theme functions.php file. The function starts with:if(!function_exists('ultra_site_header_sentinel')):
and ends with:} endif;
The entire function must be copied into the child functions.php file. You can then add your second menu.
There will most likely be extra CSS adjustments required. If you can resolve the above then you’d be most of the way there.
- AuthorPosts
You must be logged in to reply to this topic.