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, 7 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
April 22, 2020 at 8:51 pm #541918
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.
April 23, 2020 at 1:58 am #541964Add a class that targets the home page like
body.home .gd-search-field-near { display: none; }
April 23, 2020 at 5:34 am #542006I 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.
April 23, 2020 at 6:57 am #542013This reply has been marked as private.April 23, 2020 at 7:38 am #542022Yes, 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.
April 23, 2020 at 7:45 am #542025I 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?
April 23, 2020 at 7:59 am #542027This reply has been marked as private.April 23, 2020 at 2:40 pm #542145Ok, 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.
April 23, 2020 at 2:44 pm #542150Here are the other 4 images. I could only attach 4 images in the previous update.
April 23, 2020 at 2:55 pm #542161This reply has been marked as private.April 24, 2020 at 7:15 am #542256This reply has been marked as private.April 24, 2020 at 9:47 pm #542401Yes, 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?
April 24, 2020 at 10:56 pm #542425The 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.
April 24, 2020 at 11:32 pm #542436OK.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket