Tagged: Search Bar
-
AuthorPosts
-
May 31, 2018 at 1:52 pm #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.
June 4, 2018 at 8:29 pm #966775Hey Max,
I just checked it on my iPhone and I couldnt see any of such problem to be honest.
Best regards,
BasilisJune 5, 2018 at 12:36 pm #967191Hi Basilis,
open the menu and close the menu without doing anything. Then the error occurs.
June 6, 2018 at 11:22 am #967768Hi,
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,
RikardJune 14, 2018 at 9:28 am #972707Yeah 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?June 15, 2018 at 6:35 am #973105Hi,
Ok, thanks for the info. Could you post details to your staging site so that we can have a look at it?
Best regards,
RikardJuly 5, 2018 at 5:23 pm #981671Hi 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
July 6, 2018 at 11:53 pm #982283Hi,
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 -
AuthorPosts
- The topic ‘Search bar mobile’ is closed to new replies.