Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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.

    #532199

    Hi mamiewong!

    Please refer to my post here – https://kriesi.at/support/topic/search-function-missing-from-mobile-view/#post-519389

    Regards,
    Yigit

    #532208

    Hello,
    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 Text

    What 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 ?

    #532217

    Hi!

    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,
    Basilis

    #532254

    Hello,
    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?

    #533614

    Hi!

    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,
    Andy

    #533680

    It 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.

    #534578

    Hi!

    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,
    Ismael

    #534589

    Hello, 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.

    #536663

    Hi!

    I can see the search form just fine on mobile:

    View post on imgur.com

    Could you fix it?

    Cheers!
    Andy

    #536756

    Hello, 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.

    #537815

    Hey!

    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,
    Ismael

    #537835

    Dear 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,
    -Mamie

    #538082

    Hi Mamie!

    You are welcome, we are always happy to help.
    Thank you for taking the time to post your appreciation, we appreciate it :)

    Let us know if you have any other questions or issues and have a great day!

    Best regards,
    Yigit

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Missing Search Box on Mobile Device’ is closed to new replies.