-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-resume.php
387 lines (312 loc) · 10.4 KB
/
archive-resume.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
379
380
381
382
383
384
385
386
387
<?php get_header(); ?>
<?php get_template_part( 'nav' ); // Navigation bar (nav.php) ?>
<div id="sectionHeaderBackground">
<div id="sectionHeader" class="container">
<div class="row">
<div class='span12'>
<h1><?php wp_title(""); ?></h1>
</div>
</div>
</div>
</div>
<!-- /end SectionHeader -->
<div id="mainBackground" class="resume">
<div id="main" class="container">
<div class="row">
<!-- <div class="span2 resume-menu">
<ul class="nav nav-list sp-sidenav">
<li><a href="#introduction">Introduction</a></li>
<li><a href="#experience">Experience</a></li>
<li><a href="#education">Education</a></li>
<li><a href="#organizations">Organizations</a></li>
<li><a href="#awards">Awards</a></li>
<li><a href="#skills">Skills</a></li>
</ul>
</div>-->
<div class="span12" data-spy="scroll" data-target="#resume-menu">
<section id="experience">
<div class="row">
<div class="span3 section-title">
<h2>Experience</h2>
</div>
<!-- /end section name -->
<div class="span9 hidden-phone">
</div>
</div>
<div class="row">
<div class="span3 hidden-phone">
</div>
<div class="span9 section-content">
<?php
// http://wordpress.org/support/topic/list-posts-by-taxonomy-tag
$post_type = 'resume';
$tax = 'organization';
$tax_terms = get_terms($tax,'hide_empty=0');
if ($tax_terms) {
foreach ($tax_terms as $tax_term) {
$args=array(
'post_type' => $post_type,
"$tax" => $tax_term->slug,
'post_status' => 'publish',
'section' => 'experience',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) { ?>
<header class="row">
<div class="span4">
<h4 class="tax_term-heading" id="<?php echo $tax_term->slug; ?>">
<?php echo $tax_term->name; ?>
</h4>
</div>
<div class="span5">
</div>
</header>
<div class="company-info row">
<div class="span8">
<?php echo $tax_term->description;?>
</div>
</div>
<!-- /end company desc -->
<?php } ?>
<?php
$project_args=array(
'post_type' => 'project',
"$tax" => $tax_term->slug,
'post_status' => 'publish',
'post_per_page' => -1,
'caller_get_posts' => 1
); ?>
<?php
$project_query = null;
$project_query = new WP_Query($project_args);
if( $my_query->have_posts() ) {
echo '<h5 class="widget-title">Featured Projects</h5>';
echo '<div class="project-group">';
// echo get_option('taxonomy_' . $term_id . '["option_key_here"]');
while ($project_query->have_posts()) : $project_query->the_post(); ?>
<div class="row project-row">
<div class="span8 resume-position">
<p class="pull-right clientName">
<em>for</em>
<?php $terms = get_the_terms ($post->id, 'client'); ?>
<?php
$skills_links = wp_list_pluck($terms, 'name');
$skills_yo = join(", ", $skills_links);
?>
<span><?php echo $skills_yo; ?></span>
<p>
<a href="<?php the_permalink() ?>">
<h5><?php the_title(); ?></h5>
</a>
</div>
</div>
<!-- /end project row -->
<?php
endwhile;
echo "</div>";
echo "<!-- /end project-group -->";
// echo "<p><a href=\"#top\">Back to top</a></p>";
}
wp_reset_query();
}
}
?>
</div>
</div>
<!-- /end row -->
</section>
<!-- /end experience section -->
<hr>
<section id="organizations">
<div class="row">
<div class="span3 section-title">
<h2>Organizations</h2>
</div>
<!-- /end section name -->
<div class="span9 hidden-phone">
</div>
</div>
<div class="row">
<div class="span3 hidden-phone">
</div>
<div class="span9 section-content">
<?php
// http://wordpress.org/support/topic/list-posts-by-taxonomy-tag
$post_type = 'resume';
$tax = 'organization';
$tax_terms = get_terms($tax,'hide_empty=0');
if ($tax_terms) {
foreach ($tax_terms as $tax_term) {
$args=array(
'post_type' => $post_type,
"$tax" => $tax_term->slug,
'post_status' => 'publish',
'section' => 'organizations',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) { ?>
<header>
<h4 class="tax_term-heading" id="<?php echo $tax_term->slug ?>">
<?php echo $tax_term->name ?>
</h4>
</header>
<?php } ?>
<?php
$project_args=array(
'post_type' => 'project',
"$tax" => $tax_term->slug,
'post_status' => 'publish',
'post_per_page' => -1,
'caller_get_posts' => 1
);
$project_query = null;
$project_query = new WP_Query($project_args);
if( $my_query->have_posts() ) {
echo '<h5 class="widget-title">Featured Projects</h5>';
echo '<div class="project-group">';
// echo get_option('taxonomy_' . $term_id . '["option_key_here"]');
while ($project_query->have_posts()) : $project_query->the_post(); ?>
<div class="row project-row">
<div class="span8 resume-position">
<p class="pull-right project-role">
<em>as</em> <?php $key="Role"; echo get_post_meta($post->ID, $key, true); ?>
</p>
<a href="<?php the_permalink() ?>">
<h5><?php the_title(); ?> </h5>
</a>
</div>
</div>
<!-- /end project-row -->
<?php
endwhile;
echo "</div>";
echo "<!-- /end org -->";
// echo "<p><a href=\"#top\">Back to top</a></p>";
}
wp_reset_query();
}
}
?>
</div>
</div>
<!-- /end row -->
</section>
<!-- /end organization section -->
<hr>
<section id="education">
<div class="row">
<div class="span3 section-title">
<h2>Education</h2>
</div>
<div class="span9 hidden-phone">
</div>
</div>
<div class="row">
<div class="span3 hidden-phone">
</div>
<!-- /end section name -->
<div class="span9 section-content">
<?php
// http://wordpress.org/support/topic/list-posts-by-taxonomy-tag
$post_type = 'resume';
$tax = 'organization';
$tax_terms = get_terms($tax,'hide_empty=0');
if ($tax_terms) {
foreach ($tax_terms as $tax_term) {
$args=array(
'post_type' => $post_type,
"$tax" => $tax_term->slug,
'post_status' => 'publish',
'section' => 'education',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
echo "<header><h4 class=\"tax_term-heading\" id=\"".$tax_term->slug."\"> $tax_term->name </h4></header>";
echo $tax_term->description;
echo get_option('taxonomy_' . $term_id . '["location"]');
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<div class="row">
<div class="span9">
<?php the_content(); ?>
</div>
</div>
<?php
endwhile;
// echo "<p><a href=\"#top\">Back to top</a></p>";
}
wp_reset_query();
}
}
?>
</div>
</div>
<!-- /end row -->
</section>
<!-- /end education section -->
<hr>
<section id="skills">
<div class="row">
<div class="span3 section-title">
<h2>Skills</h2>
</div>
<div class="span9 hidden-phone">
</div>
</div>
<div class="row">
<div class="span3 hidden-phone">
</div>
<div class="span9 section-content">
<?php
//list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin)
$post_type = 'project';
$taxonomy = 'skill';
$orderby = 'count';
$order = 'desc';
$show_count = 0; // 1 for yes, 0 for no
$pad_counts = 0; // 1 for yes, 0 for no
$hierarchical = 1; // 1 for yes, 0 for no
$title = '';
$empty = 0;
$args = array(
'post_type' => $post_type,
'taxonomy' => $taxonomy,
'orderby' => $orderby,
'order' => $order,
'show_count' => $show_count,
'pad_counts' => $pad_counts,
'hierarchical' => $hierarchical,
'title_li' => $title,
'hide_empty' => $empty
);
?>
<ul>
<?php wp_list_categories( $args ); ?>
</ul>
</div>
</section>
<!-- /end education section -->
</div>
</div>
<!-- end row -->
</div>
<!-- /end main -->
</div>
<!-- /mainBackground -->
<?php get_footer(); ?>