-
Notifications
You must be signed in to change notification settings - Fork 6
/
search.php
50 lines (31 loc) · 1.05 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
<?php get_header(); ?>
<div class="content">
<?php if (have_posts()) :?><?php while(have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('miotema_single', array('class' => 'img-res','alt' => get_the_title())); ?>
</a>
<?php the_excerpt();?>
</article>
<?php endwhile; ?>
<div class="pagination">
<?php /* Pagination */
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
?>
</div>
<?php else : ?>
<h3> <?php esc_html_e('Sorry, no posts matched your criteria.', 'miotema'); ?> </h3>
<?php endif; ?>
</div>
<aside class="sidebar">
<?php get_sidebar(); ?>
</aside>
<?php get_footer(); ?>