-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
executable file
·44 lines (39 loc) · 1.13 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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package __RT
* @subpackage RT_Theme
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php do_action('rt_before_main'); ?>
<div class="search-result">
<h2 class="heading">Kết quả tìm kiếm : <?php echo get_query_var('s'); ?></h2>
<?php
if(have_posts()) {
while(have_posts()){
the_post();
?>
<div class="news-post">
<h2 class="title"><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php echo the_title();?></a></h2>
<a href="<?php the_permalink();?>" title="<?php the_title();?>">
<?php if(has_post_thumbnail()) the_post_thumbnail("medium",array("alt" => get_the_title()));
else echo $no_thum; ?>
</a>
</div>
<?php
}//End while
}//Endif
?>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer();