-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsearch.php
42 lines (36 loc) · 1.48 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
<?php
include_once './header.php';
$searchfor="";
if(isset($_GET['search']))
{
$searchfor=$_GET['search'];
}
$searchresults=$frontend->search_posts($searchfor);
$totalvisitorcount=$frontend->visitorcount('Homepage');
?>
<div class="breadcumb-area section_padding_100 bg-img background-overlay" style="background-image: url(img/bg-img/1.jpg);">
<div class="container">
<div class="single-post-title-content ">
<h2 class="font-pt">Search Results For: <?php echo $searchfor; ?></h2>
</div>
</div>
</div>
<section class="search-post-area section_padding_100">
<div class="container">
<div class="row">
<?php
foreach ($searchresults as $post) { ?>
<div class="col-12 search-post p-3">
<div class="theme-post-tag">
<a href="./catagory.php?category=<?php echo $post['post_type']; ?>"><?php echo $post['post_type']; ?></a>
</div>
<h2 class="font-pt"><a style="color:inherit;font:inherit;" href="./post.php?id=<?php echo $post['post_id']; ?>"> <?php echo $post['post_title']; ?> </a> </h2>
<p class="theme-post-date"><?php echo date("F j, y",strtotime($post['post_date'])); ?></p>
</div>
<?php } ?>
</div>
</div>
</section>
<?php
include_once './footer.php';
?>