Last active
February 28, 2018 08:55
-
-
Save sachinkiranti/0b9abf60ef87c6e806370730ec720881 to your computer and use it in GitHub Desktop.
Search form snippets for wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Search form snippets for wordpress | |
* Article : https://raisachin.wordpress.com/2018/02/20/customize-the-search-form-as-you-want-in-wordpress/ | |
* Article : https://raisachin.com.np/customize-search-form-want-wordpress/ | |
* | |
*/ | |
?> | |
<form role="search" method="get" class="search-form" | |
action="<?php echo esc_url(home_url('/')); ?>"> | |
<div class="input-group"> | |
<input type="search" | |
placeholder="<?php echo esc_attr_x( 'Searching for ...', 'placeholder', 'text domain' ); ?>" | |
value="<?php the_search_query(); ?>" | |
name="s"> | |
</div> | |
<button type="submit" class="btn btn-primary">submit</button> | |
</form> | |
<?php | |
/** | |
* | |
* Search form snippets for wordpress | |
* using the form | |
* | |
*/ | |
?> | |
<?php get_search_form(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment