-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsearch.php
48 lines (46 loc) · 1.55 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
<?php
get_header();
$count = 'No';
if (have_posts()) :
$count = $wp_query->found_posts;
?>
<h2 class="page-title"><?php _e( 'Search for ‘', 'easel' ); the_search_query(); _e( '’', 'easel' ); ?></h2>
<div class="searchresults"><?php printf(_n( "%d result.", "%d results.", $count, 'easel' ),$count); ?></div>
<div class="clear"></div>
<?php
if (easel_themeinfo('display_archive_as_links')) { ?>
<div <?php post_class(); ?>>
<div class="post-head"></div>
<div class="entry">
<table class="archive-table">
<?php while (have_posts()) : the_post(); ?>
<tr><td class="archive-date"><?php the_time('M d, Y') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="<?php _e( 'Permanent Link:', 'easel' ); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
<?php endwhile; ?>
</table>
</div>
<div class="post-foot"></div>
</div>
<?php } else {
while (have_posts()) : the_post();
$post_format = ($post->post_type !== 'post') ? $post->post_type : get_post_format();
get_template_part( 'content', $post_format );
endwhile;
} ?>
<div class="clear"></div>
<?php easel_pagination();
else : ?>
<div class="post post-search uentry type-page">
<div class="post-head"></div>
<div class="post-content">
<div class="entry">
<h3><?php _e( 'No results found.', 'easel' ); ?></h3>
<p><?php _e( 'Try another search?', 'easel' ); ?></p>
<p><?php get_search_form(); ?></p>
</div>
</div>
<div class="post-foot"></div>
</div>
<?php
endif;
get_footer();
?>