Digital experiences for all disciplines
Forum Replies Created
-
Posted in: We hit Power Elite.
-
That worked! Didn’t know that setting existed. Thanks Ed!
Hi 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’ => ” ) );
Thanks Kyle!
Yup, 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>`I 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.
This actually didn’t fix the nav bar issue. I had to explicitly set it in the header.php file.
Thanks! It worked! Hope this is addressed in the next release.
Ok are you on Skype?
Sure, what’s your email? Btw, WordPress admin login information was provided with my initial post.
I see. The important thing to understand is I’ve already tried this and I still got any error. Do you have any idea why based on my the errors I’ve posted?
Mohammad, can you confirm you’ve successfully been able to create a child theme like this? Do you have any input on the error I mentioned in previous posts?
Hi Rui,
I’m 100% positive I remove those files from the child theme. I tried your solution initially and that’s how I got the error in my first post. That’s what led me to copy the admin folder since it had the files referenced in the error. For the most part it this solution worked except the nav bar didn’t render.
Have you guys been able to recreate this error by attempting to create a child theme? Is it unique to my theme?
I deleted them and not I get this error:
Warning: require_once([root directories]/wp-content/themes/ability-child-theme/admin/admin-interface.php): failed to open stream: No such file or directory in [root directories]/wp-content/themes/ability/functions.php on line 70 Fatal error: require_once(): Failed opening required '[root directories]/wp-content/themes/ability-child-theme/admin/admin-interface.php' (include_path='.:/usr/local/share/pear54') in [root directories]/wp-content/themes/ability/functions.php on line 70
-
Posted in: We hit Power Elite.