[Resolved] Adding words to Search Box

Home Forums Support [Resolved] Adding words to Search Box

Home Forums Support Adding words to Search Box

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #806014
    Jim

    For the search box in my main menu, I’d love to add the words “Search Here” that then disappear when someone clicks on the box. I’ve had a few people tell me that they were confused what happened when they click the search icon and a bar appeared. Is there any way to add disappearing text into the box? Thanks.

    #806079
    Leo
    Staff
    Customer Support

    Hi there,

    The second example should be what you are looking for:
    https://docs.generatepress.com/article/generate_navigation_search_output/

    #806082
    Jim

    That’s great. Figured you all had answered that before, but I couldn’t find it.

    One question though. Is there any way to change the text color (preferably to white)? It blends in a bit more than I’d like with the default.

    #806128
    Leo
    Staff
    Customer Support

    Looks like you’ve figured out?

    I’m seeing white text: https://www.screencast.com/t/y3TNiAPO

    #806173
    Jim

    I’m talking about the part that says “Enter your search” I’d like to change the color of that so it’s a bit more obvious. Not the color of the text once you start typing a search.

    #806201
    Leo
    Staff
    Customer Support

    I don’t see the word “enter your search”.

    Did you remove it? Or you might need to clear your caching plugin.

    #806205
    Jim

    I just checked on an on logged in browser and its there. https://snag.gy/LuJPUV.jpg

    The text is really light, and I’d like to make it brighter so it’s easier to see

    #806293
    Leo
    Staff
    Customer Support

    Try this:

    .navigation-search input[type="search"]::placeholder {
        color: #ffffff;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #806295
    Jim

    Works perfectly. One more question though. Is there any way to make the text disappear when someone clicks the box? I have a somewhat older readership (which is why I wanted the text in the first place), so I don’t want them to get confused trying to erase the text before typing their search.

    #806298
    Leo
    Staff
    Customer Support

    I don’t think that’s possible as the input field is already activated when the search icon is clicked.

    So there is no need to click the box again before typing in the search field.

    #806300
    Jim

    Ok. I know you don’t have to delete the text. I just thought it would be nice to have it disappear on click just so no one is confused.

    #806305
    Leo
    Staff
    Customer Support

    What I was trying to explain is that we don’t actually know when the user clicks on the search box again as it’s already activated when the search icon is clicked.

    Shouldn’t be too hard for users to figure out I hope πŸ™‚

    #806307
    Jim

    Gotcha. Thanks for the help. Would be nice to have the option on click, but it’s better with the text there regardless.

    #806311
    Leo
    Staff
    Customer Support

    We will keep that in mind for sure πŸ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.