• Hi all,

    I really need the menu to be hamburger/mobile menu on desktop not just mobile.

    I thought i had done it, but it does seem to work as expected.

    I modified the flash.js file and created my own flash-stu.js file. I dequeued the original and enqueued my file.

    then i change the css to my required screen size.

    the javascript works (i can see the changes while using the inspect tool), but other happens.

    can anyone help me please?

    /* menu change */
    @media (max-width: 2560px){
    #site-navigation .menu-toggle {
        cursor: pointer;
        display: inline-block;
        font-size: 20px;
    	}}
    
    @media (max-width: 2560px){
    #site-navigation, .center-logo-below-menu #site-navigation {
        float: right;
        padding: 20px 0;
    	}}
    
    @media (max-width: 2560px){
    #site-navigation .menu {
        background: #fff none repeat scroll 0 0;
        display: none;
        left: 0;
        position: absolute;
        top: 100%;
        width: 100%;
        z-index: 9999;
        padding: 0 20px;
    	}}
    @media (max-width: 2560px){
    #site-navigation ul li, .transparent #site-navigation ul li {
        float: none;
        margin-right: 0;
        padding: 0;
        position: relative;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    	}}
    add_action( 'wp_enqueue_scripts', 'wpshout_dequeue_and_then_enqueue', 100 );
    
    function wpshout_dequeue_and_then_enqueue() {
        // Dequeue (remove) parent theme script
        wp_dequeue_script( 'flash-custom' );
    
        // Enqueue replacement child theme script
        wp_enqueue_script(
            'flash-custom-stu',
            get_stylesheet_directory_uri() . '/js/flash-stu.js',
            array( 'jquery' )
        );
    }
    • This topic was modified 2 years, 4 months ago by stuartcr.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter stuartcr

    (@stuartcr)

    Hi all,

    so i have managed to get the menu to open and close on desktop BUT it starts open, which i do not want.

    the menu is being created, somehow?! i cannot find how, but i know that this is the problem, “style=”display: block;”

    how can i change or remove it?

    <ul id=”primary-menu” class=”menu nav-menu” aria-expanded=”false” style=”display: block;“>

    <ul id="primary-menu" class="menu nav-menu" aria-expanded="false" style="display: block;"><li id="menu-item-9755" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9755"><a href="#">About us</a></li>
    <li id="menu-item-9754" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9754"><a href="#">Services</a></li>
    <li id="menu-item-10309" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-10309"><a href="https://communitysupport.org.uk/testimonials/">Testimonials</a></li>
    </ul>

    please help

    Hi @stuartcr,

    Thanks for reaching us,

    It seems you have already contacted us by email and we have replied to your query. Kindly check the reply and continue the conversation in the email support.

    For now, I am closing the ticket from here.

    Regards,
    ThemeGrill Support Team

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Force menu to hamburger icon’ is closed to new replies.