This repository was archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
37 lines (33 loc) · 1.31 KB
/
search.php
File metadata and controls
37 lines (33 loc) · 1.31 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
<?php get_header(); ?>
<main id="main">
<div class="ucla campus masthead">
<?php if ( have_posts() ) : ?>
<header class="header">
<h1 class="entry-title"><?php printf( esc_html__( 'Search Results for: %s', 'ucla' ), get_search_query() ); ?></h1>
</header>
</div>
<div class="ucla campus entry-content">
<div class="col span_<?php echo (is_active_sidebar('primary-widget-area') ? '7' : '12') ?>_of_12">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content/content' ); ?>
<?php endwhile; else : ?>
<article id="post-0" class="post no-results not-found">
<header class="header">
<h1 class="entry-title"><?php esc_html_e( 'Nothing Found', 'ucla' ); ?></h1>
</header>
<div class="entry-content">
<p><?php esc_html_e( 'Sorry, nothing matched your search. Please try again.', 'ucla' ); ?></p>
<?php get_search_form(); ?>
</div>
</article>
<?php endif; ?>
</div>
<?php if (is_active_sidebar('primary-widget-area')) : ?>
<div class="col span_2_of_12" style="min-height: 1px;"></div>
<div class="col span_3_of_12">
<?php get_sidebar(); ?>
</div>
<?php endif; ?>
</div>
</main>
<?php get_footer(); ?>