Archived topic
Add Search Icon to Search Box
3 replies · Started by Austin on August 9, 2021
Hi,
Is it possible to add the "fa fa-search" icon before "Search keyword or location" in the following:
add_filter( 'generate_navigation_search_output', function() {
printf(
'<form method="get" class="search-form navigation-search" action="%1$s">
<input type="search" placeholder="Search keyword or location" class="search-field" value="%2$s" name="s" title="%3$s" />
</form>',
esc_url( home_url( '/' ) ),
esc_attr( get_search_query() ),
esc_attr_x( 'Search', 'label', 'generatepress' )
);
} );
Also, is it possible to disable the hover text option on the mobile navigation menu so that the items don't change color (inherit hover color from desktop) when clicked.
Thanks
Hi there,
Yes you can definitely do it.
You can add the <i> tag you want to use before the <input. You then style it with CSS to position it properly.
Also, is it possible to disable the hover text option on the mobile navigation menu so that the items don’t change color (inherit hover color from desktop) when clicked.
Can you link us to a sample page in question? To inspect for CSS writeup. Thank you. :D
Thanks Elvin
No problem. Glad to be of any help. :D