forked from creativeslice/goldenegg-public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
executable file
·45 lines (32 loc) · 1.33 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
<?php get_header(); ?>
<div id="content">
<div class="wrap">
<div id="main" role="main">
<h1 class="archive-title"><span>Search Results for:</span> <?php echo get_search_query(); ?></h1>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if( 'page' == get_post_type() ): // this is a page ?>
<article <?php post_class('cf'); ?>>
<h3><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</article>
<?php elseif( 'post' == get_post_type() ): // this is a post ?>
<article <?php post_class('cf'); ?>>
<h3><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<span class="byline">Posted <?php the_time('F j, Y'); ?></span>
<?php the_excerpt(); ?>
</article>
<?php else : // this is another post type ?>
<article <?php post_class('cf'); ?>>
<h3><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</article>
<?php endif; ?>
<?php endwhile; ?>
<?php do_action('egg/page_navi'); ?>
<?php else : ?>
<?php get_template_part( 'partials/content', 'missing' ); ?>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>