Skip to content

Instantly share code, notes, and snippets.

@corilam
Last active February 11, 2022 19:53
Show Gist options
  • Save corilam/e39be0f393a6351450317d93f1b94ce2 to your computer and use it in GitHub Desktop.
Save corilam/e39be0f393a6351450317d93f1b94ce2 to your computer and use it in GitHub Desktop.
Custom WP Search Field Elementor
// From https://github.com/elementor/elementor/issues/5598
<form class="elementor-search-form" role="search" action="https://website.com" method="get">
<input type="hidden" id="search-param" name="post_type" value="product">
<div class="elementor-search-form__container">
<input placeholder="Search for product..." class="elementor-search-form__input" type="search" name="s" title="Search" value="">
<button class="elementor-search-form__submit" type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
<span class="elementor-screen-only">Search</span>
</button>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment