• Resolved grizzlytizzy

    (@grizzlytizzy)


    Hi, a long time ago I added some code to my website. On desktop the top menu displays its links horizontally across the page, when viewed on mobile it would only show the button to click for the drop-down menu. At the time, I wanted it to automatically display the page on mobile with the list already dropped down. I’d added some code somewhere to do this. Now, I’d like to make it so that it only displays the button and people have to click to get the menu, but so much time has passed I don’t remember which .php I modified to insert the code. I’m pretty sure if I know where to look I’ll find the code and be able to fix this (I’m not actually a coder but understand it well enough). Any good suggestions on where to look? Thanks!

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

    Can you post a link to your website? Please note that this will be public and not removed later.

    One thing is for sure, that code is JavaScript. Where that is is the real question.
    Each theme is particular, so it’s hard to say exactly, but here are some blind guesses:

    • You installed a plugin that allows you to insert JavaScript snippets. Look there Oh, you say you rememebr editing a file.
    • You altered your main theme (not recommended) and edited main.js, menu.js, yourtheme-s-name.js, or scripts.js/scripts.php
    • You altered a child theme (the recommended way) and you edited probably a file similar to those above

    Without knowing what theme you use or getting to see your site, those are my guesses.
    Let us know if you can share a link.

    Hope this helps,
    Kind regards!

    Thread Starter grizzlytizzy

    (@grizzlytizzy)

    Hello, thanks for your response. I definitely recall that it was something done with Javascript. I’ve looked through all the files you mentioned in the theme and child theme folders and couldn’t find any trace of the code I placed. Moreover I looked through all sorts of directories looking for any files that were modified at a later date than installation and still couldn’t find anything. The scripts.js file seemed the most logical location to me but I copy/pasted over it from the original installation and nothing changed. The website is psihosuport.ro , I tried glancing at where it was pulling its code from via inspect element but couldn’t find anything. Again, though, I’m not actually well versed with the coding and simply cobbled it together for my friend. On mobile it automatically displays the drop-down menu as though the menu button has already been clicked, and clicking the button will try to, but won’t manage to close it again. Thanks again!

    Vlad T

    (@vladytimy)

    I have to admit I squeezed my brains on this but since I’m not a jQuery/JavaScript expert at all, I totally failed. I wanted to find that piece of code, especially since it’s a site in my native language haha.

    And I can’t test your theme on a local environment because you are using a commercial theme (BeTheme) Commercial products are not supported in these forums because forum volunteers are not given access to commercial products, so we would not know how that commercial theme is working.

    I copy/pasted over it from the original installation

    Do you still have a fresh copy of that theme from the developer? Did you do other modifications as well? If so, you can just replace the theme with the original one. Make sure to do a backup of the current theme and the database just in case something goes wrong.

    Thread Starter grizzlytizzy

    (@grizzlytizzy)

    I went through all the files again scrutinizing anything that had been edited, couldn’t find anything… opened my browser history to go back to January 2016 when the theme had been installed because I was sure to have searched for resources to do this, the history only went back to June of 2016…. that was maddening, lol… then I went through anything that might pertain in the slightest to the header menu… and found this in the theme’s custom CSS box:

    #menu {
     display: block !important;
    }

    so after all that, it was only a tiny little CSS code that was responsible. lol

    mul?umesc mult pentru ajutor!

    Vlad T

    (@vladytimy)

    Oooh! Well… I’m glad you found it. I was sure it was JavaScript ??

    If your question has been answered, we would love if you would mark this topic as resolved in the sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did. Thank you!

    mul?umesc mult pentru ajutor!

    Cu drag!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Top Menu Button on Mobile’ is closed to new replies.