Site logo

[Resolved] Customize the search bar

Home Forums Support [Resolved] Customize the search bar

Home Forums Support Customize the search bar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2294608
    Jusung

    Hello.

    I want to customize the search bar.
    I added the search bar on the right sidebar by using elements.
    However, there is no function to customize the search bar.

    Therefore, I will have to change it by adding code to CSS.
    I don’t want to use any plug-in.

    Can you advise how I can modify the code for search bar?
    On the button, I want to remove the background and want to make the icon black.
    For the Search area, I want to remove the border excepts for the underline.
    and also, I want to remove the background on the search area.
    Lastly, I want to add a sentence “Search here” in the search area.

    Thank you.

    #2294630
    Fernando
    Customer Support

    Hi Jusung,

    You can try adding this CSS through Appearance > Customize > Additional CSS:

    .wp-block-search input[type="search"] {
        background-color: transparent;
    }
    
    .wp-block-search button[type="submit"] {
        background-color: transparent !important;
        color: #000;
        border: none;
    }
    
    .wp-block-search .wp-block-search__inside-wrapper {
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
    }

    For the placeholder, you can alter it in the Block itself.

    Hope this helps!

    #2294639
    Jusung

    Thank you!
    It has been resolved now!

    #2294675
    Fernando
    Customer Support

    You’re welcome Jusung!

    #2300000
    Justin

    What CSS can I add to make the search borders round on the edges and add text “Search…” with the color blue?

    #2300259
    Fernando
    Customer Support

    Hi Justin,

    Can you start a new topic and share the link to your site?

    You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Hope to hear from you soon.

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