Support » Theme: Reykjavik » Disable mobile menu search

  • Resolved Roy Moses

    (@rmoses123)


    Hello,

    I have been trying to disable the mobile menu somehow, I am using a child theme.
    If I take the class-menu.php file and put it on my child theme it doesn’t override it, I tried to remove it on the parent theme in that file and it worked, but this is not a solution as it will be rewritten when there’s an update.

    Is there a way to hook into it with functions.php somehow and disable the mobile search?

    I know I can hide it with CSS, but since search is disabled on the site I am trying to remove anything that has to do with it and keep my output code as minimal as possible.

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author WebMan Design | Oliver Juhas

    (@webmandesign)

    Hi Roy,

    Just for completion, this support ticket was resolved at https://support.webmandesign.eu/forums/topic/disable-mobile-menu-search/

    Regards,

    Oliver

    Hi Oliver,

    I have used the provided additional CSS to hide the menu in Mobile View:

    .mobile-search-form {
    	display: none;
    }

    I does the job and hides it, but it does not remove the space that it occupies, so now I have white empty space above my navigation, and I have to drag the menu up to see it all.

    Is there a way to remove the space too?

    Thank you!
    Kala

    Hi Kala,

    The empty space is for easier use of navigation links when a visitor uses the mobile device with one hand only. That way it is much easier to reach for top links in the menu.

    If you, however, want to get rid of this empty space, please use a custom CSS, such as:

    @media (max-width: 671px) {
    	.has-navigation-mobile .main-navigation-container .mobile-search-form + .menu > ul {
    		padding-top: 20px;
    	}
    }

    Best regards,

    Oliver

    Hi Oliver,

    Thank you for the quick and prompt response!
    It works great!

    Best Regards,
    Kala

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable mobile menu search’ is closed to new replies.