Replace search button with fa icon
-
Hello, wondering if anyone can help please?
I would like to change the search submit button called for by <?php get_search_form(); ?> to use an fa icon. I have tried several things including the css:
.search-form input[type=”submit”] {
content: “\f179”;
display: inline-block;
-webkit-font-smoothing: antialiased;
/* font: normal 30px/1 ‘dashicons’; */
vertical-align: middle;
background: none;
border: none;
padding-left: 20px;
font-family: FontAwesome;
width: 60px;
}This changes the background and text but does not show the icon. Was wondering if Quark handles the naming differently to my css reference ‘content: “\f179″;’ ?
I see in the Quark documentation that fa icons can be added using <i></i> tags, don’t think i can use this in this instance. Have considered creating a new form by copying into my functions file ‘the get_search_form()’ code from the wordpress code reference site and renaming it then calling it. But not sure what to change, i was also looking into a filter to change the icon but got stuck.
I referenced:
<input type=”submit” class=”search-submit” value=”‘. esc_attr_x( ‘Search’, ‘submit button’ ) .'” />
add_filter( ‘search-submit’, ‘search-submit-icon’ );
function search-submit-icon( $text ) {
return esc_attr_x( ‘’ );
}but this keeled over my site so removed it!
Any ideas would be great, thanks in advance
- The topic ‘Replace search button with fa icon’ is closed to new replies.