search template base

This commit is contained in:
Fabiano Alencar 2018-02-23 14:18:26 -03:00
parent f90c9e9e8d
commit c0ed29e8aa
3 changed files with 33 additions and 1 deletions

20
src/search.php Normal file
View File

@ -0,0 +1,20 @@
<?php get_header(); ?>
<div class="container-fluid mt-5">
<div class="row">
<div class="col-sm">
<div id="content" role="main">
<header class="mb-4 border-bottom">
<h1><?php _e('Search Results for', 'tainacan'); ?> &ldquo;<?php the_search_query(); ?>&rdquo;</h1>
</header>
<?php get_template_part('template-parts/search-results'); ?>
</div><!-- /#content -->
</div>
<?php get_sidebar(); ?>
</div><!-- /.row -->
</div><!-- /.container-fluid -->
<?php get_footer(); ?>

View File

@ -12,7 +12,7 @@
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<p><?php _e('Sorry, no posts matched your criteria.', 'tainacan'); ?></p>
<?php endif; ?>
</div>

View File

@ -0,0 +1,12 @@
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<article role="article" id="post_<?php the_ID()?>" <?php post_class()?>>
<header>
<h2><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h2>
</header>
<?php the_excerpt(); ?>
</article>
<?php endwhile; else: ?>
<div class="alert alert-warning">
<i class="material-icons">warning</i> <?php _e('Sorry, your search yielded no results.', 'tainacan'); ?>
</div>
<?php endif; ?>