Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add search button with icon to the navigation search
add_filter( 'generate_navigation_search_output', function() {
printf(
'<form method="get" class="search-form navigation-search" action="%1$s">
<input type="search" class="search-field" value="%2$s" name="s" title="%3$s" />
<input type="submit" class="search-button" value="&#xf002;">
</form>',
esc_url( home_url( '/' ) ),
esc_attr( get_search_query() ),
esc_attr_x( 'Search', 'label', 'generatepress' )
);
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment