-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
58 lines (45 loc) · 2.06 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* The template for displaying Archive pages
*/
global $wp_query;
get_header(); ?>
<?php do_action( 'sp_start_content_wrap_html' ); ?>
<div id="main" class="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php _e('For the term', SP_TEXT_DOMAIN); ?> "<span><?php echo get_search_query(); ?></span>".
</h1>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h1>
<div class="entry-meta"><?php sp_post_meta(); ?></div>
</header>
<?php get_template_part('library/contents/post-formats'); ?>
<?php if (ot_get_option('excerpt-length') != '0'): ?>
<div class="entry excerpt">
<?php the_excerpt(); ?>
</div><!-- .entry-content -->
<?php endif; ?>
</article><!-- #post -->
<?php
endwhile;
// Pagination
if(function_exists('wp_pagenavi'))
wp_pagenavi();
else
echo sp_pagination();
else :
get_template_part( 'library/contents/no-results' );
endif;
?>
</div> <!-- #main -->
<?php get_sidebar(); ?>
<?php do_action( 'sp_end_content_wrap_html' ); ?>
<?php get_footer(); ?>