Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<form role="search" method="get" class="search-form"
action="<?php echo site_url( 'search-results/' ); ?>">
<span class="screen-reader-text">
<?php echo _x( 'Search for:', 'label' ) ?>
<input type="search" class="search-field"
placeholder="<?php echo esc_attr_x( 'Search...', 'placeholder' ) ?>"
value="<?php echo isset( $_GET['searchwp'] ) ? esc_attr( $_GET['searchwp'] ) : '' ?>"
title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" />
<input type="submit" class="search-submit"
value="<?php echo esc_attr_x( 'Search', 'submit button' ) ?>" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment