• Hi there,

    This page has been using an Edin child theme for some time and has more or less always had this issue with the navigation bar, but I’m hoping you could help assist. While using the “classic” menu, it seems to be the very last thing loaded on the site. I’ve tried calling the script for the nav first thing on the page, but that doesn’t seem to help. Any ideas?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    If the menu is set to the classic style it will only load after other elements on the page has also loaded, yes.

    I’m not sure it’s possible to change this, but we also don’t provide support for this type of customization.

    This is very strange. A menu is the most important part of a website. So it would be useful to adjust the loading sequence in an update or else explain us here ho we can do it ourselves in a child theme. Edin is a good theme but we need the menu to load first.

    I’ve been searching in the Edin files and I see the function created in functions.php and the menu is called in header.php but I can’t find where the lading sequence is changed, so some extra information really is useful.

    Noting that while changing render sequence is still outside our scope of support, there is a followup posted here: https://www.ads-software.com/support/topic/loading-sequence/

    Thread Starter the9mm

    (@the9mm)

    Hi all,

    Since support is apparently not interested in helping, I’d like to let you know what I’ve done to resolve this.

    I have tried dequeueing and deregistering the navigation scripts to instead place them in the header, since it is loaded in the footer. That did not work.

    I have tried combining the navigation scripts with scripts that load first. That did not work.

    I tried replacing the menu entirely with Max Mega Menu. That did not work as it was loading last still!

    I ultimately found that there is something between CSS and/or JS with these classes:
    <div class="header-navigation">
    and
    <div class="navigation-wrapper clear">

    When I removed these, the navigation loaded immediately, albeit much of the mobile/responsive toggle functionality was gone as it is reliant upon the CSS classes to call the JS.

    So ultimately what I ended up doing was replacing the navigation in my child theme’s header.php entirely with this code instead:

    <nav class="primary-navigation" role="navigation">
    <?php
    wp_nav_menu( array(
    'theme_location'  => 'primary',
    'container_class' => 'menu-primary',
    'menu_class'      => 'clear',
    ) );
    ?>
    </nav>

    Then I re-enabled the Max Mega Menu plugin (or your menu plugin of your choice) and restyled it. Now I have a functional, not loaded last menu.

    Edit: If you do what I did, you might as well dequeue and deregister the navigation script. No use loading additional scripts for no reason:

    function dequeue_edin_nav(){
    
    wp_dequeue_script('edin-navigation');
    wp_deregister_script('edin-navigation');
    
      }
    
    add_action('wp_print_scripts','dequeue_edin_nav');
    • This reply was modified 5 years, 8 months ago by the9mm.
    • This reply was modified 5 years, 8 months ago by the9mm.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Navigation/Menu Takes Too Long to Load’ is closed to new replies.