New Landing How can we help? Themeforest Theme Support Ability Creating a child theme

Viewing 14 posts - 16 through 29 (of 29 total)
  • Posted in: Ability
  • #113934
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Thanks Ed. I’m glad that issue resolved.
    Thanks 🙂
    With Best Regards
    Mohammad

    #115614
    feezy9
    Member
    Post count: 17

    This actually didn’t fix the nav bar issue. I had to explicitly set it in the header.php file.

    #115616
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    So have you managed to solve your issue?

    – Kyle

    #115686
    feezy9
    Member
    Post count: 17

    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.

    #115760
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Have you assigned the menu to your mobile menu?

    – Kyle

    #115958
    feezy9
    Member
    Post count: 17

    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>`

    #115964
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Will have to get Ed to check this for you

    – Kyle

    #115981
    feezy9
    Member
    Post count: 17

    Thanks Kyle!

    #115986
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    #116008
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    What issue were you having with the navigation bar? What did you change to resolve it?

    – Ed

    #116071
    feezy9
    Member
    Post count: 17

    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’ => ”
    
    ) );
    #116076
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Did you set the menu for the main navigation location in Appearance > Menus > Menu Locations?

    – Ed

    #116092
    feezy9
    Member
    Post count: 17

    That worked! Didn’t know that setting existed. Thanks Ed!

    #116193
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

Viewing 14 posts - 16 through 29 (of 29 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register