-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·379 lines (290 loc) · 13.4 KB
/
index.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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<?php get_header();
?>
<div id="inner-header" class="wrap clearfix">
<!-- to use a image just replace the bloginfo('name') with your img src and remove the surrounding <p> -->
<div id="header-content">
<p id="logo" class="h1"><a href="<?php echo home_url(); ?>" rel="nofollow"><?php //bloginfo('name'); ?></a></p>
<div id="animation-home" class="clearfix first">
<h1>
<div id="s1" class="title-block">Agence digitale</div>
<div id="s2" class="title-block">& social media</div>
<div id="s3" class="title-block"><strong>à vocation utile</strong></div>
</h1>
</div> <!-- end animation -->
</div><!-- end header-content -->
</div> <!-- end #inner-header -->
</header> <!-- end header -->
<?php
//WHAT WE NEED -NO NATIVE- TO DYNAMICALLY GRAB
$offers_query = new WP_Query($args);
$push_img_file_name = '3529638767_3622b99081_o_NB.jpg';
//BLOG POSTS
//we store the original loop query
$articles_query = $wp_query;
//OFFERS
$args = array(
'post_type' => 'offer',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'ASC'
);
$offers_query = new WP_Query($args);
//WORKS
$args = array(
'post_type' => 'folio_work',
'post__in' => get_option( 'sticky_posts' ),
'post_status' => 'publish',
'posts_per_page' => 8,
'orderby' => 'date',
'order' => 'DESC'
);
$works_query = new WP_Query($args);
//EXTENSIONS
$args = array(
'post_type' => 'extension',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC'
);
$extensions_query = new WP_Query($args);
//PUSH
$pushID = $wpdb->get_results( "SELECT value FROM options WHERE name = 'pushed_attachement_id' LIMIT 1");
$pushID = $pushID[0]->value;
$pushPost = get_post($pushID);
//var_dump($pushPost);
$pushTitle = $pushPost->post_title;
$pushSubTitle = $pushPost->post_excerpt;
$pushDesc = $pushPost->post_content;
$pushRelatedUrl = get_post_meta($pushID, "url_to_push", true);
$pushImg = wp_get_attachment_image( $pushID, 'uzful-thumb-480');
//echo $pushImg;
//PRESTATAIRES
$args = array(
'role' => 'partner',
);
$partners = get_users($args);
//EMPLOYES
$args = array(
'role' => 'employee',
);
$team = get_users($args);
//CLIENTS
$args = array(
'role' => 'client',
);
$clients = get_users($args);
?>
<div id="content">
<div id="inner-content" class="wrap clearfix">
<div id="main" class="clearfix index" role="main">
<section id="home-offers" class="eightcol first clearfix">
<a id="anchor-offers" name="anchor-offers" data-title="Nos offres" data-sub="" class="anchor"></a>
<?php
if (isset($offers_query) && $offers_query->have_posts()) {
//var_dump($offers_query);
$count=0;
while ($offers_query->have_posts()) {
$offers_query->the_post();
//var_dump($post);
?>
<?php if(($count%2)==0) { ?>
<div class="fourcol first">
<?php } ?>
<article class="post-content item-offer>">
<header class="title-wrap">
<a href="<?php the_permalink() ?>" rel="bookmark" class="image-link alignleft vertalign"title="<?php the_title_attribute(); ?>">
<div class="first">
<?php the_post_thumbnail('uzful-thumb-55'); ?>
</div>
<div class="align"><h3 class=""><?php the_title(); ?></h3></div>
</a>
</header>
<p class="content-more">
<?php
echo get_post_meta( $post->ID, '_wp_editor_sum', true );
?>
</p>
</article>
<?php if(($count%2)!=0) { ?>
</div>
<?php } ?>
<?php
$count++;
}
// Reset Post Data
wp_reset_postdata();
}
?>
<div class="more eightcol clearfix first">
<a class="button-more button-cta plus" rel="content-more"><span id="text">Une offre pour tous</span><span id="plus"></span></a>
<div class="content-more">
<p>La socialisation de l'écosystème digital permet aujourd'hui à toutes les entreprises d'y développer leur business, quelle que soit leur taille. Désormais le budget n'est plus la recette du succès... le savoir-faire, les ressources internes et la capacité d'innovation font la loi ! Allant de la formation ponctuelle à l'externalisation partielle ou totale, l'offre Uzful permet à tous de rester dans la course.<a class="goto-more button-cta clearfix plus" rel="" href="<?php echo get_post_type_archive_link('offer'); ?>"><span id="text">Nos offres en détail</span><span id="plus"></span></a></p>
</div>
</div>
</section> <!-- end home-offers -->
<section id="home-works" class="eightcol first clearfix section">
<a id="anchor-works" name="anchor-works" data-title="Nos réalisations" data-sub="" class="anchor"></a>
<h2 >Les réalisations <strong>de uzful</strong></h2>
<div id="works" class="masonry">
<?php
if (isset($works_query) && $works_query->have_posts()) {
//var_dump($offers_query);
$sizes = array('355', '230');
$size = $sizes[0];
while ($works_query->have_posts()) {
$works_query->the_post();
//var_dump($post);
?>
<article class="item-work alignleft">
<a href="<?php the_permalink(); ?>" rel="bookmark" class="image-link" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('uzful-thumb-'.$size); ?></a>
<h3 id="work-title"><a href="<?php the_permalink(); ?>" rel="post-<?php the_ID(); ?>"><?php echo $post->post_title; ?></a></h3>
<span id="work-subtitle"><?php echo get_post_meta( $post->ID, '_meta_subtitle', true ); ?></span>
</article>
<?php
$size = $sizes[rand(0, count($sizes)-1)];
}
// Reset Post Data
wp_reset_postdata();
}
?>
</div>
<a class="button-more button-cta plus" href="<?php echo get_post_type_archive_link('folio_work'); ?>"><span id="text">Voir toutes les réalisations</span><span id="plus"></span></a>
</section> <!-- end home-works -->
<section id="home-extensions" class="eightcol first clearfix">
<a id="anchor-extensions" name="anchor-extensions" data-title="Nos extensions" data-sub="" class="anchor"></a>
<h2>Les extensions <strong>de uzful</strong></h2>
<div id="extensions">
<?php
if (isset($extensions_query) && $extensions_query->have_posts()) {
$first = true;
//var_dump($offers_query);
while ($extensions_query->have_posts()) {
$extensions_query->the_post();
//var_dump($post);
?>
<article class="fourcol <?php if($first) echo 'first'; ?> post-content">
<a href="<?php the_permalink() ?>" rel="bookmark" class="image-link greyimg" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('uzful-thumb-480'); ?>
</a>
<h3><a href="<?php the_permalink(); ?>" rel="post-<?php the_ID(); ?>"><?php echo $post->post_title; ?></a></h3>
<h5 class="light-grey sans-serif"><?php echo get_post_meta( $post->ID, '_meta_subtitle', true ); ?></h5>
<p>
<?php
echo get_post_meta( $post->ID, '_wp_editor_sum', true );
?>
</p>
</article>
<?php
$first = false;
}
// Reset Post Data
wp_reset_postdata();
}
?>
</div><!-- end #extensions -->
<div class="more eightcol clearfix first">
<a class="button-more button-cta plus" rel="content-more"><span id="text">En savoir plus sur notre démarche</span><span id="plus"></span></a>
<div class="content-more">
<p>Plus qu’une agence, Uzful est une structure hybride qui ne se contente pas d’accompagner les idées des autres… Pour être toujours au top de la créativité, elle s'associe au développement de projets innovants et met ses expertises à leur service !<a class="goto-more button-cta clearfix plus" rel="" href="<?php echo get_post_type_archive_link('extension'); ?>"><span id="text">Plus de détails sur nos extensions</span><span id="plus"></span></a></p>
</div>
</div>
</section> <!-- end home-extensions -->
<section id="home-blog" class="eightcol first clearfix">
<a id="anchor-blog" name="anchor-blog" data-title="Blog" data-sub="Ici on s'exprime!" class="anchor"></a>
<div class="fourcol first">
<div class="vertalign">
<div>
<h2>Le <strong>Blog</strong> d'utilité publique</h2>
</div>
</div>
<div class="inner">
<?php
$k = 0;
while (have_posts()) : the_post();
if($k >= 3) break;
?>
<article>
<time datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time('j/n'); ?></time>
<h4><?php echo $post->post_title; ?></h4>
<p><?php the_excerpt(); ?> <?php //echo bones_excerpt_more('pouet'); ?></p>
</article>
<?php
$k++;
endwhile; ?>
</div><!-- end .inner -->
</div>
<div class="fourcol last">
<div class="vertalign">
<div>
<h2><?php echo $pushTitle; ?></h2>
</div>
</div>
<div class="inner">
<a title="<?php echo $pushTitle; ?>" class="image-link" name="<?php echo $pushTitle; ?>" href="<?php echo $pushRelatedUrl; ?>"><?php echo $pushImg; ?></a>
<h3><?php echo $pushSubTitle; ?></h3>
<p><?php echo $pushDesc; ?></p>
</div><!-- end .inner -->
</div>
</section><!-- end home-blog -->
<section id="home-clients" class="eightcol first clearfix">
<a id="anchor-clients" name="anchor-clients" data-title="Clients" data-sub="" class="anchor"></a>
<h2>Nos <strong>Clients</strong></h2>
<div class="clients">
<div class="clearfix eightcol first carousel-wrapper">
<div class="list_carousel responsive">
<?php if(count($clients)){ ?>
<ul id="carousel-clients">
<?php foreach ($clients as $client) { ?>
<li><a class=""><?php echo user_avatar_get_avatar($client->ID, 150); ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</div>
<a id="back-clients" class="arrow back"><</a>
<a id="forward-clients" class="arrow forward">></a>
</div>
</div>
</section><!-- end home-clients -->
<section id="home-staff" class="eightcol first clearfix">
<a id="anchor-staff" name="anchor-staff" data-title="Notre équipe" data-sub="" class="anchor"></a>
<h2>Notre <strong>équipe</strong></h2>
<div class="staff">
<div class="clearfix eightcol first carousel-wrapper">
<div class="list_carousel responsive">
<?php if(count($team)){ ?>
<ul id="carousel-staff">
<?php foreach ($team as $worker) { ?>
<li><a class=""><?php echo user_avatar_get_avatar($worker->ID, 217); ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</div>
<a id="back-staff" class="arrow back"><</a>
<a id="forward-staff" class="arrow forward">></a>
</div>
</div>
</section><!-- end home-staff -->
<section id="home-partners" class="eightcol first clearfix">
<a id="anchor-partners" name="anchor-partners" data-title="Nos partenaires" data-sub="" class="anchor"></a>
<h2>Nos <strong>partenaires</strong></h2>
<div class="partners">
<div class="clearfix eightcol first carousel-wrapper">
<div class="list_carousel responsive">
<?php if(count($partners)){ ?>
<ul id="carousel-partners">
<?php foreach ($partners as $partner) { ?>
<li><a class=""><?php echo user_avatar_get_avatar($partners->ID, 135); ?></a></li>
<?php } ?>
</ul>
<?php } ?>
<a id="back-partners" class="arrow back"><</a>
<a id="forward-partners" class="arrow forward">></a>
</div>
</div>
</div>
</section><!-- end home-partners -->
</div> <!-- end #main -->
<?php ////get_sidebar(); // sidebar 1 ?>
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>