-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
127 lines (102 loc) · 3.41 KB
/
search.php
File metadata and controls
127 lines (102 loc) · 3.41 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
/**
* @package WordPress
* @subpackage Gentle
*/
get_header(); ?>
<?php
global $more;
$mp_option = gentle_get_global_options();
$page_id = $wp_query->get_queried_object_id();
$sidebar_position = 'right';
?>
<script>
jQuery(document).ready(function($) {
var $container = $('#mpc-page-content');
$container.imagesLoaded( function() {
$container.isotope({
resizable: false,
animationEngine: 'best-available',
masonry: { columnWidth: 1 }
});
});
$(window).resize(function(){
$container.isotope({ masonry: { columnWidth: 1 } });
});
});
</script>
<div id="mpc-content" role="main">
<div id="mpc-page-wrap" class="sidebar-<?php echo $sidebar_position; ?> search-results">
<h2 class="mpc-home-header left">
<?php _e('Search Results', 'gentle'); ?>
</h2>
<h4 class="mpc-home-header left">
<?php printf( __('for: %s', 'gentle'), '"'.get_search_query().'"' ); ?>
</h4>
<div id="mpc-page-content" class="archive blog blog1 sidebar-<?php echo $sidebar_position; ?>">
<?php while (have_posts()) {
the_post();
global $more;
$more = 0;
$post_meta = '';
$page_data = '';
$post_meta = get_post_custom($post->ID);
/* Get post data */
if(isset($post_meta['post_shortcode'][0]))
$page_data['sh'] = $post_meta['post_shortcode'][0];
/* lightbox parameters */
if(isset($post_meta['lightbox_enable'][0]))
$page_data['lb'] = $post_meta['lightbox_enable'][0];
if(isset($post_meta['caption'][0]))
$page_data['lb_caption'] = $post_meta['caption'][0];
if(isset($post_meta['lightbox_src'][0]))
$page_data['lb_src'] = $post_meta['lightbox_src'][0];
?>
<div id="post-<?php the_ID(); ?>" class="post" >
<div class="mpc-post-thumbnail">
<?php if(isset($page_data['lb']) && $page_data['lb'] != 'off' ) {
mpc_gentle_add_lightbox($page_data); ?>
<span class="mpc-gentle-post-hover"></span>
<?php } ?>
<?php if( isset($page_data['sh']) && $page_data['sh'] != '') {
$sh = $page_data['sh'];
$search = substr($sh, 0, 1);
if($search == '[')
echo do_shortcode($sh);
else
echo $sh;
} elseif(has_post_thumbnail()) {
the_post_thumbnail();
} ?>
</div>
<h4 class="mpc-page-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a></h4>
<small>
<?php the_time('M d Y');?>
<?php if(function_exists('zilla_likes')) {
echo ' ·';
zilla_likes();
}?>
</small>
<?php
if(get_post_type() == "post")
the_content('', TRUE, ''); ?>
<span class="gentle-deco-line"></span>
</div><!-- end blog-post -->
<?php } ?>
</div> <!-- end mpc-page-content -->
<?php do_action('mpc_post_loop', $wp_query); ?>
<div id="mpc-gentle-nav">
<div class="mpc-next-page"><?php next_posts_link(); ?></div>
<div class="mpc-previous-page"><?php previous_posts_link(); ?></div>
</div>
<?php if($sidebar_position != 'none')
get_sidebar(); ?>
</div> <!-- end mpc-page-wrap -->
<div id="gentle-load-more">
<span id="gentle-lm-button"><?php _e('Load More', 'gentle'); ?></span>
<span id="gentle-lm-info"></span>
</div>
</div> <!-- end mpc-content -->
<?php get_footer(); ?>