-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.php
40 lines (33 loc) · 1.35 KB
/
search.php
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
<?php get_header(); ?>
<div class="o-layout-row">
<main class="o-wrapper-wide" role="main" itemscope itemprop="mainContentOfPage" itemtype="https://schema.org/WebPageElement">
<h1 class=""><span>Search Results for:</span> <?php echo esc_attr(get_search_query()); ?></h1>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article <?php post_class(); ?> role="article">
<header class="c-article-header">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php get_template_part( 'template-part/post/entry-meta' ); ?>
</header>
<!-- /c-article-header -->
<section class="c-excerpt-content">
<?php the_excerpt(); ?>
</section>
<!-- /c-excerpt-content -->
</article>
<!-- /article -->
<?php endwhile; ?>
<?php get_template_part( 'template-part/post/post-nav' ); ?>
<?php else : ?>
<article class="PostNotFound">
<header class="ArticleHeader">
<h4><?php _e("Sorry, No Results.", "flexdev"); ?></h4>
</header>
<section class="EntryContent">
<p><?php _e("Please try another search.", "flexdev"); ?></p>
</section>
</article>
<?php endif; ?>
</main>
</div>
<!-- /layout-row-->
<?php get_footer(); ?>