Compare commits
No commits in common. "main" and "js-03" have entirely different histories.
|
@ -46,9 +46,8 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form') ) {
|
|||
|
||||
// check for values in url and get value if available
|
||||
if( isset($_GET[ $fieldname ]) ) {
|
||||
|
||||
$filteredvalues['value'] = explode(',', $_GET[ $fieldname ]);
|
||||
} else {
|
||||
$filteredvalues['value'] = [];
|
||||
};
|
||||
//end check for values in url
|
||||
|
||||
|
@ -56,12 +55,12 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form') ) {
|
|||
if( $fieldname == $fields['name']) {
|
||||
?>
|
||||
|
||||
<section id="fund-filter fund-filter-<?php echo $fields['name']; ?>" class="<?php echo $fields['name']; ?>">
|
||||
<h5 class="oficinasuport-titol-opcions"><?php echo $fields['label'];?></h5>
|
||||
<section id="fund-filter-<?php echo $fields['name']; ?>" class="<?php echo $fields['name']; ?>">
|
||||
<h5><?php echo $fields['label'];?></h5>
|
||||
<?php foreach( $fields['choices'] as $choicevalue => $choicelabel ) { ?>
|
||||
|
||||
<div class="filter" data-filter="<?php echo $fields['name'];?>">
|
||||
<input class="ofisuport-filter" type="checkbox" name="<?php echo $fields['name'];?>" <?php if( in_array( $choicevalue, $filteredvalues['value']) ) { echo 'checked'; } ?> value="<?php echo $choicevalue; ?>" />
|
||||
<input class="ofisuport-filter" type="checkbox" name="<?php echo $fields['name'];?>" <?php if( in_array($choicevalue,$filteredvalues['value']) ) { echo 'checked';}; ?> value="<?php echo $choicevalue ?>" />
|
||||
<label for="<?php echo $choicevalue; ?>"><?php echo $choicelabel;?></label>
|
||||
</div>
|
||||
|
||||
|
@ -84,22 +83,8 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form') ) {
|
|||
</form>
|
||||
<?php //close the form and subit ?>
|
||||
|
||||
<?php }; //end if groupkey ?>
|
||||
<aside id="search-form-ajuts" class="ofisuport-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="ofisuport-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 amb paraula clau..." value="<?php the_search_query(); ?>" name="s" />
|
||||
<input type="submit" id="searchsubmit" class="search-submit" value="cerca">
|
||||
<span class="ofisuport-search-submit ofisuport-icon-search"></span>
|
||||
<input type="hidden" value="ofisuport-ajut" name="post_type" id="post_type" />
|
||||
</form>
|
||||
</aside>
|
||||
<?php }; //end if groupkey ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
Loading…
Reference in New Issue