0
|
1 |
<?php get_header(); ?> |
|
2 |
<div id="content" class="clearfix"> |
|
3 |
<div id="blog-post"><!-- start BLOG section --> |
|
4 |
<?php menu(-1); ?> |
|
5 |
<div class="clearfix"></div> |
|
6 |
<div class="page-title mt37"> |
|
7 |
<h2 class="titleH2"><?php _e('Search Results','pego_tr'); ?></h2> |
|
8 |
<span class="shortDesc11">}</span><p class="shortDesc12">Results found...</p> |
|
9 |
|
|
10 |
</div> |
|
11 |
</div> |
|
12 |
<div id="main-left search-content" class="fl"> |
|
13 |
<?php |
|
14 |
$items=0; |
|
15 |
$news=0; |
|
16 |
?> |
|
17 |
<?php if (have_posts()) : ?> |
|
18 |
|
|
19 |
<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?> |
|
20 |
<?php while (have_posts()) : the_post(); ?> |
|
21 |
|
|
22 |
<div <?php post_class() ?> id="post-<?php the_ID(); ?>"> |
|
23 |
<?php setPostViews(get_the_ID()); ?><!-- counting views of post --> |
|
24 |
<?php |
|
25 |
$items++; |
|
26 |
$postType = get_post_meta($post->ID, 'post_type_selected' , true); |
|
27 |
if($postType == 'News'){ $news++; continue;} |
|
28 |
?> |
|
29 |
|
|
30 |
<p class="blog-post-date"><?php the_time('F j, Y') ?></p> |
|
31 |
<h3 class="blog-post-title blogposttitleExtra"><?php the_title(); ?></h3> |
|
32 |
|
|
33 |
<div class="blog-line mt10"></div> |
|
34 |
<div class="blog-details"> |
|
35 |
<ul> |
|
36 |
<li><span><?php echo getPostViews(get_the_ID()); ?></span> <?php _e('Views','pego_tr'); ?></li> |
|
37 |
<li>/</li> |
|
38 |
<li><span><?php comments_number( '0', '1', '%' ); ?></span> <?php _e('Comments','pego_tr'); ?> </li> |
|
39 |
<li>/</li> |
|
40 |
<li><span><?php _e('in','pego_tr'); ?> <a href="#"><?php the_category(', '); ?></a></span></li> |
|
41 |
<li>/</li> |
|
42 |
<li><span><?php _e('by','pego_tr'); ?> <?php the_author() ?></span></li> |
|
43 |
</ul> |
|
44 |
</div> |
|
45 |
<div class="clearfix"></div> |
|
46 |
<div class="blog-line mt15"></div> |
|
47 |
|
|
48 |
<div class="entry"> |
|
49 |
|
|
50 |
<?php if( get_post_type() == 'portfolio') { ?><div class="clearfix"></div> |
|
51 |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> |
|
52 |
<div class="one-third-search fl"><a href="<?php the_permalink() ?>" class="lightbox-image"><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&h=129&w=208&zc=1" alt="" title="<?php the_title(); ?>" /></a></div> |
|
53 |
<div class="two-third-search last-column fl"><p><?php the_excerpt(); ?></p> |
|
54 |
|
|
55 |
|
|
56 |
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="readmore colorFFF"><span><?php _e('View','pego_tr'); ?></span></a> |
|
57 |
</div> |
|
58 |
<?php } |
|
59 |
else |
|
60 |
if( get_post_type() == 'post') { ?> |
|
61 |
<div class="clearfix"></div> |
|
62 |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> |
|
63 |
<div class="one-third-search fl mr20"><a href="<?php the_permalink() ?>" class="lightbox-image"><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&h=129&w=208&zc=1" alt="" title="<?php the_title(); ?>" /></a></div> |
|
64 |
<div class="two-third-search last-column fl mt-3"><p><?php the_excerpt(); ?></p> |
|
65 |
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="readmore colorFFF"><span><?php _e('View','pego_tr'); ?></span></a> |
|
66 |
|
|
67 |
|
|
68 |
</div> |
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
<?php } |
|
73 |
else |
|
74 |
|
|
75 |
if( get_post_type() == 'page'){ |
|
76 |
$content= get_the_excerpt(); |
|
77 |
?> |
|
78 |
<p><?php the_excerpt(); ?></p> |
|
79 |
<div class="readmore"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php _e('View page','pego_tr'); ?></a></div> |
|
80 |
<?php } |
|
81 |
?> |
|
82 |
<div class="clear"></div> |
|
83 |
<div class="fullwidth-seperator mb-24"></div> |
|
84 |
</div> |
|
85 |
</div> |
|
86 |
</div> <!-- end main left --> |
|
87 |
|
|
88 |
<?php endwhile; ?> |
|
89 |
|
|
90 |
<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?> |
|
91 |
|
|
92 |
<?php else : ?> |
|
93 |
<div class="search-nothing fl"> |
|
94 |
<h2><?php _e('No posts found.','pego_tr'); ?></h2> |
|
95 |
<p><?php _e('Ooopppssss... There is nothing to found!','pego_tr'); ?> |
|
96 |
<br /><br /> |
|
97 |
<?php _e('Please try again.','pego_tr'); ?> |
|
98 |
</p> |
|
99 |
</div> |
|
100 |
<?php endif; ?> |
|
101 |
|
|
102 |
|
|
103 |
<?php |
|
104 |
if(($items == $news)&&($items != 0)) { ?> |
|
105 |
<div class="search-nothing-news fl"> |
|
106 |
<h2><?php _e('No posts found.','pego_tr'); ?></h2> |
|
107 |
<p><?php _e('Ooopppssss... There is nothing to found!','pego_tr'); ?> |
|
108 |
<br /><br /> |
|
109 |
<?php _e('Please try again.','pego_tr'); ?> |
|
110 |
</p> |
|
111 |
</div> |
|
112 |
<?php |
|
113 |
} |
|
114 |
?> |
|
115 |
|
|
116 |
<div id="sidebar-right" class="fl mt-30"> |
|
117 |
<?php get_sidebar(); ?> |
|
118 |
</div> |
|
119 |
<div class="clearfix"></div> |
|
120 |
|
|
121 |
</div> |
|
122 |
</div> |
|
123 |
|
|
124 |
|
|
125 |
|
|
126 |
<?php get_footer(); ?> |