added search field for funds in side filters

This commit is contained in:
jorge 2023-04-07 19:36:48 +02:00
parent 624ceeafd2
commit d05eb07c41
1 changed files with 16 additions and 1 deletions

View File

@ -85,6 +85,21 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form') ) {
<?php //close the form and subit ?>
<?php }; //end if groupkey ?>
<aside id="search-form-ajuts" class="search-ajuts">
<?php
// search form for custom post type 'oficinasuport-ajut'
// <input type="hidden" value="ofisuport-ajut" name="post_type" id="post_type" />
// https://developer.wordpress.org/reference/functions/get_search_form/#comment-369
// https://wordpress.stackexchange.com/questions/313037/restrict-a-sear ch-to-a-custom-post-type
?>
<form class="search-form" role="search" method="get" action="/">
<label class="screen-reader-text" for="search">Search in ajuts</label>
<input type="search" id="search" class="search-field" placeholder="cerca ajut..." value="<?php the_search_query(); ?>" name="s" />
<input type="submit" id="searchsubmit" class="search-submit button button-search" value="Enviar">
<input type="hidden" value="ofisuport-ajut" name="post_type" id="post_type" />
</form>
</aside>
</div>