forked from dimensionmedia/WPArmchair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
266 lines (185 loc) · 8.39 KB
/
home.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<?php get_header(); ?>
<?php
/* There's an option for the user to switch on a 'timeline' interface (probably post-conference)
/* This requires the install of the timeline-verite-shortcode plugin and json-api plugin
/* See the readme... but no worries, even if the user wants this on without the plugins it'll never happen */
if ( get_theme_mod('timeline_active') == "on" && function_exists('verite_timeline_shortcode') ) {
?>
<!-- Top
================================================== -->
<div id="myTop" class="myTopcontainer">
<div class="myTopcontainer-inner">
<div class="bigitem active">
<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" class="jumbo-tron" />
</div>
<?php echo do_shortcode('[timeline width="100%" height="620" maptype="toner" src="'.home_url().'/api/wparmchair/featured_posts/?amount=100"]'); ?>
</div>
</div><!-- /.carousel -->
<?php } else { ?>
<!-- Top
================================================== -->
<div id="myTop" class="myTopcontainer">
<div class="myTopcontainer-inner">
<div class="bigitem active">
<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" class="jumbo-tron" />
<div class="container">
<div class="row">
<div class="span6">
<div class="carousel-caption">
<h1><?php bloginfo( 'name' ); ?></h1>
<p class="lead"><?php bloginfo( 'description' ); ?></p>
<form method="get" action="/" class="form-inline" >
<a href="http://wpyall.com/" target="_blank" class="btn btn-large"><?php _e( 'Visit Official Site ', 'wparmchair' ); ?></a>
</form>
</div>
</div>
<div class="span5 offset0">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<?php
// get last featured post
$counter = 1;
$args = array(
'post_type' => array ( 'wpgtp_tweets', 'wpgip_instagrams', 'wpgfp_flickrs', 'post' ),
'orderby' => 'post_date',
'order' => 'DESC',
'posts_per_page' => 3,
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'wpgtp_tweet_types',
'field' => 'slug',
'terms' => 'featured'
),
array(
'taxonomy' => 'wpgip_instagram_types',
'field' => 'slug',
'terms' => 'featured'
),
array(
'taxonomy' => 'wpgfp_flickr_types',
'field' => 'slug',
'terms' => 'featured'
),
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'featured'
)
)
);
$the_query = new WP_Query( $args );
// The Loop
while ( $the_query->have_posts() ) :
$the_query->the_post();
if ($counter == 1) {
echo '<div class="item active">';
} else {
echo '<div class="item">';
}
wparm_process_post_display ( $post, 'media-item col2 featured', 'featured' );
echo '</div>';
$counter++;
endwhile;
?>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /.carousel -->
<?php
} // get_theme_mod('timeline_active')
?>
<div class="container how-to">
<div class="row">
<div class="span12">
<div class="row">
<?php if ( function_exists( 'lip_love_it_link' ) ) { ?>
<div class="span1"> </div>
<?php } else { ?>
<div class="span2"> </div>
<?php } ?>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-picture"></i> <?php _e( 'Photos', 'wparmchair' ); ?></h3>
<p><?php printf( __( 'Post a public picture to <i class="icon-camera-retro"></i> Instagram, <i class="icon-twitter"></i> Twitter, or <i class="icon-camera"></i> Flickr & tag it <strong>%1$s</strong>.', 'wparmchair' ), get_theme_mod('misc_hashtag') ); ?></p>
</div>
</div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-twitter"></i> <?php _e( 'Tweets', 'wparmchair' ); ?></h3>
<p><?php printf( __( 'Use the hashtag <strong>%1$s</strong> on <i class="icon-twitter"></i> Twitter and we\'ll grab your tweets.', 'wparmchair' ), get_theme_mod('misc_hashtag') ); ?></p>
</div>
</div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-facetime-video"></i> <?php _e( 'Video', 'wparmchair' ); ?></h3>
<p><?php printf( __( 'Share your <i class="icon-twitter"></i> Vine & <i class="icon-camera-retro"></i> Instagram videos with the hashtag <strong>%1$s</strong>.', 'wparmchair' ), get_theme_mod('misc_hashtag') ); ?></p>
</div>
</div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-upload"></i> <?php _e( 'Submit', 'wparmchair' ); ?></h3>
<p><?php printf( __( 'Submit your own photos directly via the <a href="%1$s">WordPress mobile app</a>.', 'wparmchair' ), home_url('submit-photo') ); ?></p>
</div>
</div>
<div class="span2">
<?php if ( function_exists( 'lip_love_it_link' ) ) { ?>
<div class="well well-small">
<h3><i class="icon-heart"></i> <?php _e( 'Love', 'wparmchair' ); ?></h3>
<p><?php _e( 'Love your favorite posts by clicking on <i class="icon-heart-empty"></i>. Most loved posters might get a treat.', 'wparmchair' ); ?></p>
</div>
<?php } ?>
</div>
<div class="span2"> </div>
</div>
</div>
</div>
</div>
<div class="container video-container"></div>
<div id="fullscreen_container">
<div class="container no-padding" id="notice_div">
<p style="text-align: center;">
<a class="has-spinner">
<span class="spinner"><i class="icon-spin icon-refresh"></i></span>
<span class="notice-message"><?php _e('Just chilling out for a few seconds.', 'wparmchair' ); ?></span>
</a>
</p>
<p class="message"> <?php _e( 'Why not go ', 'wparmchair' ); ?><a href="#" id="fullscreen_trigger"><?php _e( 'fullscreen ', 'wparmchair' ); ?></a> <?php _e( 'or ', 'wparmchair' ); ?>
<?php if ( isset($_GET['allimages']) && $_GET['allimages'] != "true") { ?>
<a href="<?php home_url(); ?>/?allimages=true"><?php _e( 'view only photos ', 'wparmchair' ); ?></a>
<?php } else { ?>
<a href="<?php home_url(); ?>/"><?php _e( 'see everything ', 'wparmchair' ); ?></a>
<?php } ?>
?</p>
</div>
<div class="container" id="media-container">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php wparm_process_post_display ( $post ); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no media posts exist.', 'wparmchair' ); ?></p>
<?php endif; ?>
</div> <!-- #container -->
<div id="push"></div>
</div>
</div> <!-- fullscreen container -->
<div class="container" id="loadmore_div">
<p style="text-align: center;">
<a class="btn btn-large has-spinner">
<span class="spinner"><i class="icon-spin icon-refresh"></i></span>
<span class="loadmore-message"><?php _e( 'Load More ', 'wparmchair' ); ?></span>
</a>
</p>
</div>
<p> </p>
<?php get_footer(); ?>