Search box in site header

This topic contains 8 replies, has 3 voices, and was last updated by  randallu 8 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #252845

    randallu
    Expired Member
    Post count: 59

    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

    #252964

    Kor
    Moderator
    Post count: 16516

    Hi 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!

    #257468

    randallu
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #257644

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    i don’t see any search widget in the header, did you remove it?

    let us know,

    Thanks

    #262355

    randallu
    Expired Member
    Post count: 59

    I have it back in now, poorly formatted though at the moment haha.

    #262723

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

    #262724

    randallu
    Expired Member
    Post count: 59

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

    #262774

    Paolo
    Site Admin
    Post count: 31206

    Sorry 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

    #262799

    randallu
    Expired Member
    Post count: 59

    Yeah 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…

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount