Skip to content

Instantly share code, notes, and snippets.

@ibndawood
Created May 29, 2020 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ibndawood/20ebca48a899daf1584c86d869a521d0 to your computer and use it in GitHub Desktop.
Save ibndawood/20ebca48a899daf1584c86d869a521d0 to your computer and use it in GitHub Desktop.
Bethlehem - clickable search icon
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<style>.search-form:after{content:none!important;}</style>
<div style="display:flex">
<label>
<span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" style="border-top-right-radius: 0; border-bottom-right-radius: 0;border-right:0;" />
</label>
<button type="submit" class="search-submit" style="background:#fff;border:none;padding:0;position:static !important;clip:inherit;height: 36px;border: 1px solid #cbc6ac;border-radius: 30px;border-left: 0;padding-right: 16px;border-top-left-radius: 0;border-bottom-left-radius: 0;"><i class="fa fa-search"></i></button>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment