forked from tareq1988/wedocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
31 lines (26 loc) · 770 Bytes
/
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
<?php
// The Loop
if ( have_posts() ) {
printf( '<h2 class="category-title">%s</h2>', __( 'Documents', 'wedocs' ) );
echo '<ul class="doc-category">';
while (have_posts()) {
the_post();
get_template_part( 'templates/loop-content' );
}
echo '</ul>';
} else {
?>
<div class="alert alert-warning">
<?php _e( 'Nothing found!', 'wedocs' ); ?>
</div>
<?php
}
?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav class="post-nav">
<ul class="pager">
<li class="previous"><?php next_posts_link( __( '← Older posts', 'wedocs' ) ); ?></li>
<li class="next"><?php previous_posts_link( __( 'Newer posts →', 'wedocs' ) ); ?></li>
</ul>
</nav>
<?php endif; ?>