Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Created June 26, 2020 11:25
Show Gist options
  • Select an option

  • Save farookibrahim/41f250dcac0424ffd540c1621caf5ae5 to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/41f250dcac0424ffd540c1621caf5ae5 to your computer and use it in GitHub Desktop.
Front - WeDocs Customize Search Form
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 &hellip;', 'front' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" aria-label="<?php echo esc_attr__( 'Documentation Search &hellip;', '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