Skip to content

Instantly share code, notes, and snippets.

@johnmccole
Last active September 11, 2023 09:55
Show Gist options
  • Save johnmccole/ad8c1a7788338dbd7a0bc60753048e08 to your computer and use it in GitHub Desktop.
Save johnmccole/ad8c1a7788338dbd7a0bc60753048e08 to your computer and use it in GitHub Desktop.
// Custom search form
add_filter('get_search_form', function () {
$form = '';
echo template('partials.search');
return $form;
});
{!! get_search_form(false) !!}
<form class="d-flex position-relative me-2" role="search" method="get" value="Search" action="{!! home_url() !!}">
<input class="form-control rounded-1 border-white has-transparent-background-color" type="search" placeholder="Search" aria-label="Search" value="" name="s">
<button class="position-absolute border-0 has-white-colour has-transparent-background-color" style="top: 0; right: 0; bottom: 0; width: 50px;" type="submit"><i class="fas fa-search"></i></button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment