-
AuthorPosts
-
November 8, 2015 at 6:28 pm #532194
The search box is missing when I am looking at my website on my mobile phone. What can I do add a search box that works on my mobile phone?
I had searched the Enfold forums and saw similar questions but the solutions had not solved this problem.
November 8, 2015 at 6:51 pm #532199Hi mamiewong!
Please refer to my post here – https://kriesi.at/support/topic/search-function-missing-from-mobile-view/#post-519389
Regards,
YigitNovember 8, 2015 at 7:52 pm #532208Hello,
I went to the Appearance>Editor and added/saved:
add_shortcode(‘avia_search’, ‘get_search_form’);I then went to Appearance>Menus
I clicked on Custom Links
–>This asked for URL and Link TextWhat would be the URL? The link text should only show up on mobile devices but not on desktop/laptop computers.
Where would the short code go on Appearance>Menus ?
November 8, 2015 at 8:12 pm #532217Hi!
The php code, has to be added to the functions.php file, and not from Appearance, editor.
Then the shortcode has to be added from the Apperance -> Menu and to the menu that is your main.If you still face any issues, also check
https://kriesi.at/support/topic/search-bar-on-mobile-menu/if that can be helpful.
Best regards,
BasilisNovember 8, 2015 at 9:06 pm #532254Hello,
I went to the functions.php Text file. I did a search and did not find the word, Appearance in it.I added: add_shortcode(‘avia_search’, ‘get_search_form’);
[avia_search]
as the last two lines of text in that file and saved that file with these edits in it.Perhaps I am misunderstanding the last part of your reply. When the Appearance>Menus asks for a URL, does it mean to add a website address, or am I looking in the wrong place?
November 10, 2015 at 7:30 pm #533614Hi!
not sure what you mean. Did you add the code? and does it work for you? Let us know if you still need help with this issue.
Regards,
AndyNovember 10, 2015 at 9:16 pm #533680It is not working; no search box yet of my website on mobile.
I added the suggested edits, including the short code, only to functions.php and it did not solve my problem.
My website Appearance>Menu does not have a place for short code so where would I put it?
I don’t know what I am doing wrong.
November 12, 2015 at 6:52 am #534578Hi!
I tried Yigit’s modification and it works but if you click on the search field, the mobile menu will close immediately. Please do this instead: https://kriesi.at/support/topic/search-widget-only-in-mobile-view/#post-517247
Add this in the functions.php file:
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).'</li>'; $items = $search . $items; } return $items; }
.. then use this in the Quick CSS field:
@media only screen and (max-width: 767px) { #top #searchform>div { display: block !important; opacity: 1 !important; } }
Regards,
IsmaelNovember 12, 2015 at 7:25 am #534589Hello, Ismael,
I added the code to my functions.php file and I also made the edits to the Quick CSS field also, but still no search box when I visit my website using my mobile phone. When I click on the menu icon, it shows all my menu items, but no search box.I’m wondering: My website is private, not public. Would that possibly make the search box not appear?
Also, my iPhone is an iPhone 4. Would that also possibly make the search box not appear?In the meantime, as an alternative, I’ve added a compatible plug-in that creates a search box. I’ve placed that at the footer of my website. But once a solution is found to my missing search box problem, I will delete the plug-in and use the solution that you provide.
Many thanks for your continued efforts in helping me to solve my problem.
November 16, 2015 at 5:12 pm #536663Hi!
I can see the search form just fine on mobile:
Could you fix it?
Cheers!
AndyNovember 16, 2015 at 6:19 pm #536756Hello, the search box is not visible on my mobile when I go to my site’s Home, About, Inspirations, Books, Causes, and Contact pages. I want the search box on all pages.
November 18, 2015 at 6:02 am #537815Hey!
We added the code for you. Please remove the browser cache then reload the page. Note that the search box will only appear on screen sizes lower than 767px.
Regards,
IsmaelNovember 18, 2015 at 7:00 am #537835Dear Kriesi team,
Thank you so very much for your individual and collective efforts in helping me to have a search box that appears on every page of my website when viewed on my mobile phone. I just tested it out after clearing my cache and it works great.I appreciate all of the hard work and persistence of your team in helping me with the various questions I’ve had. My website is all the better for it. Thank you again,
-MamieNovember 18, 2015 at 2:02 pm #538082 -
AuthorPosts
- The topic ‘Missing Search Box on Mobile Device’ is closed to new replies.