Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #964779

    Hi guys,
    i use this code to add a search bar to the menu on mobile only:

    add_filter( ‘wp_nav_menu_items’, ‘avf_add_search’, 3, 2 );
    function avf_add_search( $items, $args ) {
    if ($args->theme_location == ‘avia’)
    {
    $search = ‘<li id=”menu-item-search-mobile” class=”menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-18 current_page_item menu-item-top-level menu-item-top-level-5″>’.get_search_form(false).’‘;
    $items = $search . $items;
    }
    return $items;
    }
    After that, use this code in the Quick CSS field:
    @media only screen and (max-width: 767px) {
    #top #searchform>div {
    display: block !important;
    opacity: 1 !important;
    }
    }

    This work well until you open the menu and close again without doing something. Then the whole screen has moved a cm to the left and is not coming back until you reload the page.

    I also would like to have a search bar between sorting options and (where you are info). Could you send me code for that?

    Thanks
    Max

    • This topic was modified 6 years, 6 months ago by Max.
    #966775

    Hey Max,

    I just checked it on my iPhone and I couldnt see any of such problem to be honest.

    Best regards,
    Basilis

    #967191

    Hi Basilis,

    open the menu and close the menu without doing anything. Then the error occurs.

    #967768

    Hi,

    Thanks for the feedback. Could you try updating the theme to the latest version (4.4.1) to see if that helps please? https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#theme-update

    Best regards,
    Rikard

    #972707

    Yeah that is a bit tricky, Our guy before did a lot of modifactions in the code without a child theme. The Update on stage is still not working proper.
    Main problem is that the layer slider on the start site will not show once i have updated the files. You have any idea about this error?

    #973105

    Hi,

    Ok, thanks for the info. Could you post details to your staging site so that we can have a look at it?

    Best regards,
    Rikard

    #981671

    Hi Rikard,

    so finally i could do the update and this specific problem is gone. BUT other problems appear. I will open a new thread.

    Thanks

    #982283

    Hi,

    Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Basilis

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Search bar mobile’ is closed to new replies.