-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
47 lines (42 loc) · 1.61 KB
/
Copy pathsearch.php
File metadata and controls
47 lines (42 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* The template for displaying search results pages.
*
* @package Cielos
* @since Cielos 1.0.0
*/
get_header(); ?>
<div class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<main id="main" class="lg:col-span-2" role="main" tabindex="-1">
<header class="page-header mt-[-1rem] mb-40 border-b border-[var(--c-border)] pb-4">
<h1 class="page-title text-4xl font-bold text-[var(--c-fg)]">
<?php _e('Search Results for', 'cielos'); ?> "<span class="text-[var(--c-primary)]"><?php echo get_search_query(); ?></span>"
</h1>
</header>
<div id="search-results">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('template-parts/content', get_post_format()); ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part('template-parts/content', 'none'); ?>
<?php endif; ?>
<?php
// Check if cielos_pagination exists, otherwise use default WordPress navigation
if (function_exists('cielos_pagination')) :
cielos_pagination();
else :
the_posts_navigation(array(
'prev_text' => '<span class="text-sm text-[var(--c-primary)] hover:underline">← ' . __('Older posts', 'cielos') . '</span>',
'next_text' => '<span class="text-sm text-[var(--c-primary)] hover:underline">' . __('Newer posts →', 'cielos') . '</span>',
));
endif;
?>
</div>
</main>
<?php get_sidebar(); ?>
</div>
</div>
<?php
get_footer();