How to hide search field in home page only

This topic contains 13 replies, has 3 voices, and was last updated by  rigots 4 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #541918

    rigots
    Lifetime Member
    Post count: 275

    I would like to remove the search field option only in the home page but not at the top of the search results.

    There are lots of posts on how to hide the Search Near field in all GD Search Bars with CSS below.
    .gd-search-field-near {
    display: none;
    }

    I would like to hide the Search Near Field only on the home page search bar, is there a CSS to do this?

    Thank you.

    #541964

    Alex Rollin
    Moderator
    Post count: 27815

    Add a class that targets the home page like

    
    
    
    body.home .gd-search-field-near {
    display: none;
    }
    
    #542006

    rigots
    Lifetime Member
    Post count: 275

    I added the CSS you provided above but that did not work.

    You said to add a class. Does that mean that I have to add class before I enter that CSS?
    Where do you add the class in this same CSS file?

    I will search up on how to a class but if you have a sample that would be great.

    Thank you.

    #542013

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #542022

    rigots
    Lifetime Member
    Post count: 275

    Yes, since the Near City Search is not working consistently. I would like to remove the search only for the home page. I rather users to just select Category and So at least they see the listings, then in the search results page they will have a chance type in the city and if this don’t work out, at least they know they can go back and see all the listings.

    I wish the Near: City search would work, but it does not. Even when I type just the city without there are some old dropdown selections shown.

    #542025

    rigots
    Lifetime Member
    Post count: 275

    I already put the CSS to only show the “Near: Location” option on search, but as soon as I click on the search bar, before I even type anything there are lost of “IN:Locations” to choose from in the drop down, I don’t undeserved if the is just from my browser history or what?

    #542027

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #542145

    rigots
    Lifetime Member
    Post count: 275

    Ok, so I able to remove the home location bar with this CSS.
    body.home .gd-search-field-near {
    display: none;
    }

    But in my search results page I still have the search bar at the top and the dropdown suggestion results are just inconsistent.
    When I place the mouse on the search bar without typing anything just by clicking the mouse in the search field a get lots of suggestions “IN” City suggestions without typing anything, see “Search1.png” image bellow, why I have the CSS that is only supposed to suggest “NEAR” suggestions.
    Now “Search2.npg” image shows that I can still select any of the “IN” city search results even though I have not even typed anything into the location search Window at this point.
    Then I type “san jose” and I get three “NEAR” san jose suggestions see “Search3.png” image.
    I select Near: San Jose, CA, USA and click on search see “Search4.png” for results.
    Then I type in “San Franciso, CA” and as you can see in “Search5.png” there are no suggested results in the dropdown.
    Then I type in “san jose” again and this time there are no suggested results see “Search6.png”.
    Then I type “san jose, ca ” then I get “Near” suggestions for san jose, note that I only got the suggestion after a click space bar after typing “san jose” with out the space bar there were not suggestions, see image “Search7.png”.
    Then I type in “San Franciso” and it is still showing me the same San Jose, suggestions it did when I typed in “San Jose” see “Search8.png”

    So as you can see this is very inconsistent and confusing.

    I will provide my credentials in a private message below so you can see my site and give me suggestions on what may be wrong.

    Thank you.

    #542150

    rigots
    Lifetime Member
    Post count: 275

    Here are the other 4 images. I could only attach 4 images in the previous update.

    #542161

    rigots
    Lifetime Member
    Post count: 275
    This reply has been marked as private.
    #542256

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #542401

    rigots
    Lifetime Member
    Post count: 275

    Yes, You guys pointed me to the CSS that hides only the “IN” recommendations and I applied that CSS, but that is not working properly that is my whole point, that is why I included so many screenshots, so you can see even after I apply this CSS there are “IN” results by just clicking on the search box without typing anything, and there other times when there are “NEAR” suggestions and other times that the are NO “NEAR” suggestion when I type the same city at different times, so it is not working properly why?

    #542425

    Alex Rollin
    Moderator
    Post count: 27815

    The CSS, when active, hides the results. The results are dynamic, so, you may see them popup, then disappear as the CSS is taking effect.

    This is a workaround as there isn’t a feature to do what you are asking about.

    #542436

    rigots
    Lifetime Member
    Post count: 275

    OK.

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

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

Open Support Ticket