-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
52 lines (41 loc) · 1.95 KB
/
search.php
File metadata and controls
52 lines (41 loc) · 1.95 KB
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
<?php get_header(); ?>
<div id="content" class="section site-content match-height">
<div class="container">
<div class="row">
<div class="col-sm-12">
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<h1 class="search-title something-missing"><?php printf( __( 'Search Results for: %s', 'codexin' ), '<span>"' . get_search_query() . '"</span>' ); ?></h1>
<?php
while ( have_posts() ) :
the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class( 'post-item' ); ?>>
<div class="post-single-content search-content">
<?php if ( has_post_thumbnail() ) : ?>
<div class="image-featured">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'post-grid-thumbnail' ); ?></a>
</div>
<?php endif; ?>
<div class="post-details">
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p class="post-excerpt"><?php echo wp_trim_words( get_the_excerpt(), 20, '...' ); ?></p>
</div>
<!-- <div class="read-more">
<a class="primary-btn enroll-btn" href="<?php // the_permalink(); ?>"> <?php // _e('Read More ','codexin'); ?></a>
</div> -->
</div>
</div> <!-- end of .post-item -->
<?php endwhile ?>
<?php else : ?>
<h2 class="search-title text-center"><?php _e( 'Nothing found for the search keyword "' . get_search_query() . '"', 'codexin' ); ?></h2>
<p class="text-center"> <?php _e( 'Please use the menu above to locate what you are searching for. Or you can try searching with another keyword below:', 'codexin' ); ?> </p>
<?php get_search_form(); ?>
<?php endif ?>
</main> <!-- end of #primary -->
<?php codexin_posts_navigation(); ?>
</div><?php // .col-xs-12 ?>
</div><?php // #content .container .row ?>
</div><?php // #content .container ?>
</div><?php // #content ?>
<?php get_footer(); ?>