• Resolved Myles Taylor

    (@webdev8800)


    The submenu’s are not staying open. When I click on the drop-down arrow, they open, and then immediately close.

    Things I’ve tried:
    Removed all other JavaScript files
    Removed all other CSS
    Updated WordPress
    Attempted to track down click event in Chrome developer console.

    I’ve also attempted to add a console log for the click event to see if it’s firing twice, which it’s not. Any suggestions?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Peter Featherstone

    (@peterfeatherstone-1)

    Hey there,

    What theme is this built with as it doesn’t seem to have all the things required for a WordPress compliant theme.

    For example, none of the body classes are showing which I think is part of the problem.

    Please advise

    Peter

    Thread Starter Myles Taylor

    (@webdev8800)

    The theme is a custom theme. I didn’t do the original build of the site. I’ve added in the
    <?php body_class(); ?>
    so it’s adding in the usual WP body classes, and still not working. Do you have any other recommendations?

    Peter Featherstone

    (@peterfeatherstone-1)

    Hey there,

    That’s strange, I can’t see anything obvious as to why that is happening.

    Can you try reverting to the default WordPress theme and see if it still happens. If it does, can you try disabling all other plugins and seeing the same.

    Please let me know

    Peter

    Thread Starter Myles Taylor

    (@webdev8800)

    Reverting to original WordPress theme (Twenty Fifteen) makes it so it does work. I would think the problem is linked to a JavaScript conflict considering the dropdown events fire, and no CSS is getting in the way. Do you have any other suggestions?

    Peter Featherstone

    (@peterfeatherstone-1)

    Hey there,

    So it’s an issue with the theme you have. As I said previously it didn’t look to be built to WordPress standards so I expected that to be the case.

    I can’t see any other JavaScript events attached to the sub-menus in the console so without debugging the whole theme it will be quite hard to make any solid suggestions.

    All I can say is try and look through the functions.php and comment parts out to see if it works when some part is removed, especially around functions that touch menus, classes, javascript and CSS.

    Please let me know if you find anything.

    Peter

    Thread Starter Myles Taylor

    (@webdev8800)

    Hi Peter,

    Thanks for the responses. With your suggestions, I was able to figure it out. Whoever built the original header.php page included wp_head(); twice. I’m very pleased with your plugin and the quick support you give. Thanks again!

    Peter Featherstone

    (@peterfeatherstone-1)

    Hey there,

    Ah yes that would do it! Glad you were able to track down the cause in the end 🙂

    All the best

    Peter

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

The topic ‘Sub Menus won’t stay open’ is closed to new replies.