Tagged: enfold, magnifying glass, mobile, search, searchbox
Hello!
I used the info provided in this thread: https://kriesi.at/support/topic/search-box-in-header-on-mobile/ to put a search option on mobile, however then it changes the desktop version as well – it used to be just a magnifying glass in the navigation, now it puts the search box in the center of the header….I’ve added an @media query to take it off the desktop site, but I can’t figure out how to get the magnifying glass back on desktop.
I’ve had to take out the code until I can get it working on desktop as well — but I followed exactly the thread I have linked to above.
Thanks!
Hey StormCreek,
I’m currently seeing the magnifying glass on the desktop. Was this issue corrected?
Best regards,
Jordan Shannon
Nope, I mentioned that I had to remove the code, as I needed to have search visible on desktop.
Hi,
The above credentials did not seem to work. Could you please check them for me.
Best regards,
Jordan Shannon
Hi,
That works, thank you. Can you add the code back in? It seems to just be a matter of using the correct media queries.
Best regards,
Jordan Shannon
Alright, I put the code back in. I’m guessing the problem is that I don’t have an @media stipulation in the PHP section…but I’m not sure how to do that with PHP. If you could help right away, that would be awesome! The search icon is now missing on the desktop version
Thank you!
Hi,
I attempted to use:
if (wp_is_mobile()) {}
This should run the script only if the device is mobile. Please test from your mobile device to confirm it works.
Best regards,
Jordan Shannon
That works! Thank you, and you can close this ticket :)
Hi,
Great! I’m glad you were able to get this corrected. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon