Change Search Widget Appearance
-
Hi there,
I’m pretty much a newbie, so need help with modifying appearance of my site. First off, the search widget, which is a bit of a dog’s dinner at the moment. I’d like to get rid of the black ‘search’ button’, and the ‘Search for’ text that precedes the search box. I want to end up with a simple box, the same width as the sidebar, with the word ‘search’ in it.
I’d really appreciate any help. How do you modify a widget? Is it with CSS code? Or PHP? Where do you make the modification? What code do I need to include?
Thanks very much.The page I need help with: [log in to see the link]
-
Hey, wordpress has it’s own article on widgets: https://ww.wp.xz.cn/support/article/wordpress-widgets/
Should be just what you need.Thanks, but the article doesn’t talk about how to customise a widget. I know how to install a widget, place it in a sidebar and all that. I just want to change the appearance of a widget.
Hi there,
Please go to Appearance > Customize > Additional CSS, and please try this code:
/* Change the search field sidebar item */ input.search-field { width: 90% !important; display: block !important; margin: auto !important; } input.search-submit { display: none !important; }Just tell me if that is what you are looking for. 🙂
Many thanks! That almost did the trick. I still need to get rid of the ‘Search For’ text just above the box.
I don’t see this. Would you mind sharing a screenshot with this highlighted somehow?
You can share it using https://imgur.com/upload
Sorry, I’m not used to Imgur. Hope this works:
Hi there,
Please try changing the code that I sent you before to this new one:
/* Change the search field sidebar item */ input.search-field { width: 90% !important; display: block !important; margin: auto !important; } input.search-submit { display: none !important; } span.screen-reader-text { display: none !important; }
The topic ‘Change Search Widget Appearance’ is closed to new replies.