xarxaprod-wp-theme/search.php

75 lines
2.2 KiB
PHP
Raw Normal View History

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
*
* @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 -->
<?php
// check if is xarxaprod-ajut
if ( get_post_type( get_the_ID() ) == 'xarxaprod-ajut'){ ?>
<section id="filteredfunds" class="xarxaprod-filtered-content xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
<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 ?>
</aside>
<?php } elseif ( in_category ( 'faq' ) ) { ?>
<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(); ?>
</aside>
<?php } else { ?>
<section id="filteredsearch" class="xarxaprod-searched-query">
<?php
/* translators: %s: search query. */
printf( esc_html__( 'Search Results for: %s', 'xarxaprod' ), '<br/><span class="h5 search-query">' . get_search_query() . '</span>' );
?>
<?php }; // end if is xarxaprod-ajut ?>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
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;
?>
</content>
</section>
2024-01-09 16:13:20 +01:00
</main><!-- #main -->
<?php
get_sidebar();
get_footer();