• Resolved mrcangrejero

    (@mrcangrejero)


    Ladies and Gentlemen:

    I must have done something to the parent or child of a Twenty Seventeen Theme (wp-multisites.com) that forced the top menu to be shown at the top of the header, but I can’t remember what. I have checked everything trying to find the code affecting this, to no avail. On a “curious” note, when I scroll the page to the bottom, and then scroll back to the top, the menu stays put at the bottom of the page no matter how many times I scroll the page. Maybe you can check the site and avise. Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @mrcangrejero. I can see the problem that you mentioned in your post. A few questions will help us trace this issue:

    1. Are you running a child theme on top Twenty Seventeen?

    2. Did you implement the frozen header using custom jQuery or Javascript?

    What I would suggest is that first you switch back to the default Twenty Seventeen theme, just to ensure that this issue is not coming from a plugin. If you have added a custom frozen header, then you might want to re-examine the code for that.

    Best Regards

    Thread Starter mrcangrejero

    (@mrcangrejero)

    Thanks, CJ, for your prompt advice.

    You made me look at things a little different (kidding; a lot). I re-installed 2017 and now, when the parent theme is activated, the top menu sits where it was designed to. So, I guess that the problem is the child theme.

    Looking over the “js” files, I found a file on the child’s root called “child-theme-js.js” that is not present in the parent. I got that morsel from the page “Five Excellent Ways To Hack …“, where I recall having implemented hacks 2 and 3. Following my technical wisdom, I deleted the file “child-theme-js.js” and the following piece of code from the child’s “functions.php” file.

    // Enqueue child them js file
    add_action( 'wp_enqueue_scripts', 'child_theme_js' );
    function child_theme_js() {
      wp_enqueue_script( 'child-theme-js' , get_stylesheet_directory_uri() . '/child-theme-js.js' , array( 'twentyseventeen-global' ) , false , true );
    }

    In spite of doing the above, the top menu continues to stay on top. Except for the above deleted function, I cleared the whole “functions.php” file and re-copied each function individually, testing along the way for errors. None where detected.

    I have to take some time to fix my car. I will then deactivate all my plugins looking for culprits. Will keep you posted. Until then, the best to you and yours!

    Thread Starter mrcangrejero

    (@mrcangrejero)

    I’m back, sooner than expected. The weather is nasty. Anyway.

    It seems that, at some point, I messed up the “global.js” file in the parent. Since I overwrote it, can’t tell how. I’m using a new copy from a clean 2017 file and the problem is gone.

    Once again, thanks!

    Hey @mrcangrejero
    That’s good to hear that you’ve got the problem licked.
    Awesome troubleshooting on your part. All the best!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Assistance Request With 2017 Theme Top Menu’ is closed to new replies.