Skip to content

Instantly share code, notes, and snippets.

@MariaJackson1
Last active August 8, 2022 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MariaJackson1/2ca7a4c78cdd8e9b7bc08faaac534a7f to your computer and use it in GitHub Desktop.
Save MariaJackson1/2ca7a4c78cdd8e9b7bc08faaac534a7f to your computer and use it in GitHub Desktop.
Change default search placeholder text
// Filter to change default search placeholder text
add_filter( 'generate_search_button', function() {
return '';
} );
// Remove placeholder text
add_filter( 'generate_search_placeholder', function() {
return null;
} );
CSS:
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], textarea, select {
border-left: none;
border-top: none;
border-right: none;
background-color: transparent;
}
input#email {
background: transparent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment