-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
executable file
·55 lines (53 loc) · 1.59 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
46
47
48
49
50
51
52
53
54
55
<?php
get_header();
?>
<section class="defpages">
<div class="container">
<h1 class="designr-h1"><?php echo __('Search Results For:','designr');?></b> <?php echo get_search_query();?></h1>
</div>
</section>
<section class="page-content">
<div class="container">
<div class="row">
<div class="col-sm-8 page-maincontent blog-wrap">
<?php
$paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;
if(!have_posts()){
echo '<h2>';
echo __('Nothing found. Sorry.','designr');
echo '</h2>';}
while(have_posts()){
the_post();
$rauthor = get_the_author_meta('first_name');
$rauthorln = get_the_author_meta('last_name');?>
<div <?php post_class("blogpost");?>>
<a href="<?php the_permalink();?>"><?php the_post_thumbnail('designr_blog2');?></a>
<div class="posted"><?php echo __('Posted on','designr'); echo get_the_date();?></div>
<h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
<?php
if(strstr($post->post_content,'<!--more-->')) {
?>
<p>
<?php
echo get_the_excerpt();?> <a href="<?php the_permalink();?>"><?php echo __('Read More','designr');?></a></p>
<?php
}
else {
the_excerpt();
}
?>
</div>
<?php } ?>
<div class="site-pagination">
<?php designr_paginate_links();?>
</div>
</div>
<div class="col-sm-4 sidebar-padding">
<div class="page-sidebar <?php if($designr['card-sid-switch']==1){ echo 'card';}?>">
<?php dynamic_sidebar( 'sidebarblog' ); ?>
</div>
</div>
</div>
</div>
</section>
<?php get_footer();?>