Created
June 26, 2020 11:25
-
-
Save farookibrahim/41f250dcac0424ffd540c1621caf5ae5 to your computer and use it in GitHub Desktop.
Front - WeDocs Customize Search Form
This file contains hidden or 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
| if ( ! function_exists( 'front_wedocs_docs_search_form' ) ) : | |
| function front_wedocs_docs_search_form() { | |
| ?> | |
| <div class="gradient-half-primary-v1"> | |
| <div class="bg-img-hero-center" style="background-image: url( <?php echo esc_attr( get_template_directory_uri() ); ?>/assets/svg/components/bg-elements-10.svg );"> | |
| <div class="container space-1"> | |
| <div class="w-lg-80 mx-lg-auto"> | |
| <!-- Input --> | |
| <form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" class="wedocs-search-form input-group input-group-borderless"> | |
| <div class="input-group-prepend"> | |
| <span class="input-group-text" id="askQuestions"> | |
| <span class="fas fa-search"></span> | |
| </span> | |
| </div> | |
| <input type="hidden" name="post_type" value="docs" /> | |
| <input name="s" type="search" class="form-control" placeholder="<?php echo esc_attr__( 'Documentation Search …', 'front' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" aria-label="<?php echo esc_attr__( 'Documentation Search …', 'front' ); ?>" aria-describedby="askQuestions"> | |
| </form> | |
| <!-- End Input --> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <?php | |
| } | |
| endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment