Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Ability › Creating a child theme
New Landing › How can we help? › Themeforest Theme Support › Ability › Creating a child theme
- This topic has 28 replies, 5 voices, and was last updated 9 years by Kyle – SUPPORT.
-
Posted in: Ability
-
September 24, 2014 at 5:46 am #113934
Hi,
Thanks Ed. I’m glad that issue resolved.
Thanks 🙂
With Best Regards
MohammadSeptember 29, 2014 at 4:13 pm #115614This actually didn’t fix the nav bar issue. I had to explicitly set it in the header.php file.
September 29, 2014 at 4:20 pm #115616Hi
So have you managed to solve your issue?
– Kyle
September 30, 2014 at 2:59 am #115686I just realized I fixed the nav issue on the desktop version but now I’ve found the links aren’t populating on the mobile nav.
September 30, 2014 at 8:16 am #115760Have you assigned the menu to your mobile menu?
– Kyle
September 30, 2014 at 2:56 pm #115958Yup, this is the code from the header.php file.
`<!– OPEN #main-navigation –>
<nav id=”main-navigation”><?php
if(function_exists(‘wp_nav_menu’)) {
wp_nav_menu(array(
‘theme_location’ => ‘Main_Navigation’,
‘fallback_cb’ => ‘wp_page_menu’,
‘menu’ => ‘Navigation’
)); }
?><!– CLOSE #main-navigation –>
</nav><!– OPEN #mobile-navigation –>
<nav id=”mobile-navigation”>
<span class=”selected-option”><?php _e(“- Menu -“, “swiftframework”); ?></span>
<?php
dropdown_menu( array(‘theme_location’ => ‘Main_Navigation’,
‘fallback_cb’ => ‘wp_page_menu’,
‘menu’ => ‘Navigation’,// You can alter the blanking text eg. “- Navigate -” using the following
‘dropdown_title’ => ‘– Menu –‘,// indent_string is a string that gets output before the title of a
// sub-menu item. It is repeated twice for sub-sub-menu items and so on
‘indent_string’ => ‘- ‘,// indent_after is an optional string to output after the indent_string
// if the item is a sub-menu item
‘indent_after’ => ”) );
?>
<!– CLOSE #mobile-navigation –>
</nav>`September 30, 2014 at 3:09 pm #115964Will have to get Ed to check this for you
– Kyle
September 30, 2014 at 3:40 pm #115981Thanks Kyle!
September 30, 2014 at 3:41 pm #115986No problem
September 30, 2014 at 4:20 pm #116008What issue were you having with the navigation bar? What did you change to resolve it?
– Ed
September 30, 2014 at 7:21 pm #116071Hi Ed,
The child theme worked without error when I implemented your instructions to change the functions.php file. The problem is the nav bar wasn’t appearing on desktop and mobile. I fixed the desktop nav by explicitly setting the ‘menu’ parameter.
<?php if(function_exists(‘wp_nav_menu’)) { wp_nav_menu(array( ‘theme_location’ => ‘Main_Navigation’, ‘fallback_cb’ => ‘wp_page_menu’, ‘menu’ => ‘Navigation’ )); } ?>
But haven’t been able to render the mobile nav with this code:
dropdown_menu( array( ‘theme_location’ => ‘Main_Navigation’, ‘fallback_cb’ => ‘wp_page_menu’, ‘menu’ => ‘Navigation’, // You can alter the blanking text eg. “- Navigate -” using the following ‘dropdown_title’ => ‘– Menu –’, // indent_string is a string that gets output before the title of a // sub-menu item. It is repeated twice for sub-sub-menu items and so on ‘indent_string’ => ‘- ‘, // indent_after is an optional string to output after the indent_string // if the item is a sub-menu item ‘indent_after’ => ” ) );
September 30, 2014 at 7:44 pm #116076Did you set the menu for the main navigation location in Appearance > Menus > Menu Locations?
– Ed
September 30, 2014 at 9:01 pm #116092That worked! Didn’t know that setting existed. Thanks Ed!
October 1, 2014 at 7:36 am #116193No problem
-
Posted in: Ability
You must be logged in and have valid license to reply to this topic.