I guess the title says all. I'm trying to change the search icon of the twenty fourteen theme, because I need a darker one.

I tried like this:

.search-toggle {
        background: url('http://www.citizen-science.at/wordpress/wp-content/themes/cs/img/search-icon.png');

which results in nothing.


This is more of a simple CSS question than actually related to WordPress.

However, you need to change your style.css. As TwentyFourteen does not use images, but pseudo css-classes, you need to change this as well:

.search-toggle {
    background: #fff url('http://www.citizen-science.at/wordpress/wp-content/themes/cs/img/search-icon.png') no-repeat;
    background-size: 30px;
    background-position: 10px;
.search-toggle:before {
    content: "";

By the way, your background image is huge. Try providing a smaller one.


Aside from TwentyFourteen, like Storefront,I had to use this. Since this thread is appearing in the top search. I have to place my code in here.

.widget_product_search form::before{
    color:#c26c5e !important;
  • That won't change the icon, will it, but it will change the fill colour for all SVGs on the page? is that really what you meant to do? – Rup Oct 19 '20 at 8:12
  • I just give a head start, it should be drill down to the component that one might want to style. I just want to give the information that, that magnifier icon is actually an svg. :) – zawhtut Oct 19 '20 at 9:10
  • I edited my answer. Thank you bro Rup. – zawhtut Oct 19 '20 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.