-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsearch.php
More file actions
executable file
·35 lines (28 loc) · 1.18 KB
/
search.php
File metadata and controls
executable file
·35 lines (28 loc) · 1.18 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
<?php get_header() ?>
<h3>Search Page</h3>
<p>Search for: <?php echo get_search_query() ?></p>
<div class="container">
<div class="row">
<div class="col-sm-10">
<?php
if(have_posts()): // we have posts or not - checking
while(have_posts()): // loop section
the_post();
//get_post_format(): Aside => aside -> content-aside.php
//get_post_format(): Link => link -> content-link.php
//get_post_format(): Gallery => gallery -> content-gallery.php
// default : content.php
// content-{post-formats}.php > content.php > index.php
get_template_part("template-parts/content",get_post_format());// content.php
endwhile;
else:
echo "<h4 class='alert alert-danger'>No Post Found</h4>";
endif;
?>
</div>
<div class="col-sm-2">
<?php get_search_form(); ?>
</div>
</div>
</div>
<?php get_footer() ?>