Home / Forums / DynamiX Support / Problem with Submenu – (Js.?!)

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author

  • fatheaddrummer

    Hi There,

    Now, that I’ve spent weeks with the page speed optimization of my site, I’ve had some success and I am very happy with the result!
    Unfortunately now the submenu is no more working correctly because of defering Java script.

    (I had to deinstall several plugins, so the site looks quite weird at the moment – don’t worry :-))

    I added the following lines to my functions. php file

    // Defer Javascripts
    // Defer jQuery Parsing using the HTML5 defer property
    if (!(is_admin() )) {
    function defer_parsing_of_js ( $url ) {
    if ( FALSE === strpos( $url, ‘.js’ ) ) return $url;
    if ( strpos( $url, ‘jquery.js’ ) ) return $url;
    // return “$url’ defer “;
    return “$url’ defer onload='”;
    add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );

    if(!is_admin()) {
    // Move all JS from header to footer
    remove_action(‘wp_head’, ‘wp_print_scripts’);
    remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9);
    remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1);
    add_action(‘wp_footer’, ‘wp_print_scripts’, 5);
    add_action(‘wp_footer’, ‘wp_enqueue_scripts’, 5);
    add_action(‘wp_footer’, ‘wp_print_head_scripts’, 5);

    function optimize_jquery() {
    if (!is_admin()) {
    if($_SERVER[‘HTTPS’]==’on’) {
    wp_register_script(‘jquery’, $protocol.’//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js’, false, ‘3.6’, true);

    add_action(‘template_redirect’, ‘optimize_jquery’);

    Could you please check it and tell me if there is a solution, or if I have done anything wrong?
    I will provide you login credentials in a second privat message.

    Thank you very much!

    This reply has been marked as private.


    Also I have a second strange issue:

    The page editing section (where I can select menu behavior, sidebars, etc….for each single page) dissapeared….
    Do you have an idea what happened?



    Forget about everything! I solved all Problems, myself!

    But there’s another issue: On this page: https://www.diamond-precision-studio.com/en/ (same for german and english version)
    The submenus of “main” navigation menu is simply not displayed – but the exact same menu is displayed correctly on other pages…

    Further I want to set the header to float and transparent and fit transparent right into the first row of visual composer (fullpage image) – but I don’t come to theese results, when just activating float and transparent.

    I will turn the header to off just for the moment for developping purposes. Please feel free, to just turn it on, when you have a look on it!
    Thanks a lot!

    best, Christian

    Hi @fatheaddrummer

    Can you send screenshots as we do not see the issue on your site?



    Hi and thanks for your support!

    3. Problems, I will provide you with a screenshot:

    1. The Submenu of my main navigation menu is not displayed for some reason. “about” and “service” have submenus, but the submenu doesn’t appear

    2. You have been so kind to write a small css for me in order to make a second menu fit into the background of the first row. For some reason, this also doesn’t work correctly anymore (also provided in the screenshot). I would be very thankful, If you could have a second look!

    3. (no screenshot) In your demo of dynamix, your main navigation menu fits nicely into the background image (floating and transparent)
    When I go the page config of my frontpage and select header to “on” and “float and transparent” the menu doesn’t go into the background image…I’ve now deactivated the header, so you have to activate it first in order to test it

    Here’s the link to the screenshot:

    I provided you with login credentials earlier in this threat.

    Thank you so much, I appreciate your help!

    Best, Christian

    Hi Christian,

    1. For the submenus, it looks like one of your plugins is breaking this functionality from the theme, possibly your ‘Mega Menu’ plugin? Can you please give us permission to disable it? If you want to keep Mega Menu, then it is best to coordinate with their support team why the submenus do not work.

    2. You placed the menu on a separate row, independent from the row below it which had the background image, that is why it was on a separate area outside the background. I move it inside the same row and the menu now looks right from our end.

    3. You will need to enable ‘Sticky Menu’ for the Float+Transparent to properly work. I have set it for your site, so please check if this is how you want it to look.


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.