Search box in site header
This topic contains 8 replies, has 3 voices, and was last updated by randallu 9 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
August 24, 2016 at 7:57 pm #252845
This might go beyond support but figured I’d give it a go.
I want to add a search box between my logo and the nav menu and want to know if I’m on the right track.
I’ve added this to my header.php which adds the search shortcode to my header:
<div id="header-search-box" style="width: 30%; display: inline-block; vertical-align: top;"> <?php { echo do_shortcode('[gd_advanced_search]'); } ?> </div>From there I assume that I just use css to adjust all the divs/sections within the search shortcode to my liking. (Let me know if correct here)
If the above is correct, I am having an issue with the responsive style when I decrease my browser width. Before adding the search box it was seamless when switching between the mobile view and the browser view. However, with the search short code added I’ve noticed that the nav menu now wraps below instead of pushing it to mobile view.
Would like to know if I’m on right track or if there is an easier way to add a search box to the header.
Thanks
August 25, 2016 at 2:40 am #252964Hi randallu,
Do you mind sharing the URL of the site in question so we can take a look and see if it’s possible to use custom CSS to fix the responsive issue there? You can post the details here using the private reply option below.
Thanks!
September 1, 2016 at 3:28 pm #257468This reply has been marked as private.September 1, 2016 at 6:22 pm #257644Hi,
i don’t see any search widget in the header, did you remove it?
let us know,
Thanks
September 7, 2016 at 9:36 pm #262355I have it back in now, poorly formatted though at the moment haha.
September 8, 2016 at 3:34 pm #262723Hi,
I think you removed it again. In any case, adding a search form in the header is considered a customization.
Probably you just need some extra css to accommodate it.
Thanks
September 8, 2016 at 3:45 pm #262724It should be there? I’m seeing it…
I can work through the css it’s just the responsive design I need some direction on. I assume that it switches to mobile view at a certain width, can you point me to where to find that?
September 8, 2016 at 4:27 pm #262774Sorry I see it now.
What I see now is that it appears only on desktop and as soon as you shrink the browser windows it falls down below the header and under the featured image.
I can’t really give you that many more pointers because in my opinion there is no space for the search form in the header, especially on mobile… How would you fit it in there?
Thanks
September 8, 2016 at 4:50 pm #262799Yeah I agree that it doesn’t quite work, and is gone completely from mobile.
Basically I’m looking to add the same header based search from the Whoop theme into the Supreme theme. Didn’t think it would be this rough though…
My main reasoning is just thinking about intuitiveness of search and going back to the listings page or main page when you are on a listing details page to search seems like too many paths to take to try another search (especially for those who don’t use back button much). Biggest downfall of the Supreme theme I’ve noticed.
Alternatively I’ve added a search bar in the sidebar for the details page, just looks a little lost in all the detail though… BUT at least works on mobile.
I dunno…
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket