2024-01-09 16:13:20 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template for displaying search results pages
|
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
|
|
|
|
*
|
2024-01-13 15:46:11 +01:00
|
|
|
* @package Xarxaprod_theme
|
2024-01-09 16:13:20 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
get_header();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<main id="primary" class="site-main">
|
|
|
|
|
|
|
|
<?php if ( have_posts() ) : ?>
|
|
|
|
|
|
|
|
<header class="page-header">
|
|
|
|
</header><!-- .page-header -->
|
|
|
|
|
2024-01-13 13:44:31 +01:00
|
|
|
<?php
|
2024-01-13 15:46:11 +01:00
|
|
|
// check if is xarxaprod-ajut
|
|
|
|
if ( get_post_type( get_the_ID() ) == 'xarxaprod-ajut'){ ?>
|
2024-02-25 14:32:02 +01:00
|
|
|
<section id="filteredfunds" class="xarxaprod-filtered-content xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
|
2024-01-13 15:46:11 +01:00
|
|
|
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
|
2024-01-14 16:44:46 +01:00
|
|
|
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
|
|
|
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
|
|
|
<?php } //end if is_plugin_active ?>
|
2024-01-13 13:44:31 +01:00
|
|
|
</aside>
|
|
|
|
<?php } elseif ( in_category ( 'faq' ) ) { ?>
|
2024-01-13 15:46:11 +01:00
|
|
|
<section id="filteredsearch" class="xarxaprod-searched-query xarxaprod-search-faqs">
|
|
|
|
<aside id="xarxaprod-faqs-nav" class="xarxaprod-faqs-aside">
|
|
|
|
<?php xarxaprod_display_faqs_labels(); ?>
|
|
|
|
<?php xarxaprod_display_faqs_search(); ?>
|
2024-01-13 13:44:31 +01:00
|
|
|
</aside>
|
|
|
|
|
|
|
|
<?php } else { ?>
|
2024-01-13 15:46:11 +01:00
|
|
|
<section id="filteredsearch" class="xarxaprod-searched-query">
|
2024-01-13 13:44:31 +01:00
|
|
|
<?php
|
|
|
|
/* translators: %s: search query. */
|
2024-01-13 15:46:11 +01:00
|
|
|
printf( esc_html__( 'Search Results for: %s', 'xarxaprod' ), '<br/><span class="h5 search-query">' . get_search_query() . '</span>' );
|
2024-01-13 13:44:31 +01:00
|
|
|
?>
|
2024-01-13 15:46:11 +01:00
|
|
|
<?php }; // end if is xarxaprod-ajut ?>
|
|
|
|
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
|
2024-01-13 13:44:31 +01:00
|
|
|
|
2024-01-09 16:13:20 +01: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;
|
|
|
|
?>
|
|
|
|
|
2024-01-13 13:44:31 +01:00
|
|
|
</content>
|
|
|
|
</section>
|
2024-01-09 16:13:20 +01:00
|
|
|
</main><!-- #main -->
|
|
|
|
|
|
|
|
<?php
|
|
|
|
get_sidebar();
|
|
|
|
get_footer();
|