2022-10-24 23:46:53 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template for displaying search results pages
|
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
|
|
|
|
*
|
|
|
|
* @package Oficina_de_Suport_theme
|
|
|
|
*/
|
|
|
|
|
|
|
|
get_header();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<main id="primary" class="site-main">
|
|
|
|
|
|
|
|
<?php if ( have_posts() ) : ?>
|
|
|
|
|
|
|
|
<header class="page-header">
|
|
|
|
</header><!-- .page-header -->
|
|
|
|
|
2023-04-07 19:35:23 +02:00
|
|
|
<?php
|
|
|
|
// check if is ofisuport-ajut
|
|
|
|
if ( get_post_type( get_the_ID() ) == 'ofisuport-ajut'){ ?>
|
|
|
|
<section id="filteredfunds" class="ofisuport-filtered-funds ofisuport-ajuts-filtrats">
|
|
|
|
<aside id="fundsfilter" class="ofisuport-filter-funds ofisuport-fitre-ajuts">
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
<!-- https://stackoverflow.com/a/48314274 -->
|
|
|
|
(function($) {
|
|
|
|
$('.fund-filter').ready(function() {
|
|
|
|
$('.oficinasuport-titol-opcions').click(function() {
|
|
|
|
$(this).siblings(".filter").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})(jQuery);
|
|
|
|
</script>
|
|
|
|
<?php ofisuport_ajuts_filters_form(); // function defined in the plugin ?>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
<?php } elseif ( in_category ( 'faq' ) ) { ?>
|
|
|
|
<section id="filteredsearch" class="ofisuport-searched-query ofisuport-search-faqs">
|
2023-04-11 20:50:10 +02:00
|
|
|
<aside id="ofisuport-faqs-nav" class="ofisuport-faqs-aside">
|
2023-04-07 19:35:23 +02:00
|
|
|
<?php //if( in_category('faq') ) : ?>
|
|
|
|
<?php ofisuport_display_faqs_labels(); ?>
|
|
|
|
<?php ofisuport_display_faqs_search(); ?>
|
|
|
|
<?php //endif; //end if is_category faq ?>
|
2023-04-11 20:50:10 +02:00
|
|
|
</aside>
|
2023-04-07 19:35:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
<?php } else { ?>
|
|
|
|
<section id="filteredsearch" class="ofisuport-searched-query">
|
|
|
|
<?php
|
|
|
|
/* translators: %s: search query. */
|
|
|
|
printf( esc_html__( 'Search Results for: %s', 'ofisuport' ), '<br/><span class="h5 search-query">' . get_search_query() . '</span>' );
|
|
|
|
?>
|
|
|
|
<?php }; // end if is ofisuport-ajut ?>
|
|
|
|
<content class="archive-posts <?php ofisuport_class_posttype(); ?>">
|
|
|
|
|
2022-10-24 23:46:53 +02:00
|
|
|
<?php
|
|
|
|
/* Start the Loop */
|
|
|
|
while ( have_posts() ) :
|
|
|
|
the_post();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the loop for the search to output the results.
|
|
|
|
* If you want to overload this in a child theme then include a file
|
|
|
|
* called content-search.php and that will be used instead.
|
|
|
|
*/
|
|
|
|
get_template_part( 'template-parts/content', 'search' );
|
|
|
|
|
|
|
|
endwhile;
|
|
|
|
|
|
|
|
the_posts_navigation();
|
|
|
|
|
|
|
|
else :
|
|
|
|
|
|
|
|
get_template_part( 'template-parts/content', 'none' );
|
|
|
|
|
|
|
|
endif;
|
|
|
|
?>
|
|
|
|
|
2023-04-07 19:35:23 +02:00
|
|
|
</content>
|
|
|
|
</section>
|
2022-10-24 23:46:53 +02:00
|
|
|
</main><!-- #main -->
|
|
|
|
|
|
|
|
<?php
|
|
|
|
get_sidebar();
|
|
|
|
get_footer();
|