Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (68 sloc) 3.797 kb
9865b2f @cpeckens Job Market Tweaks
authored
1 <?php
2 /*
3 Template Name: Job Market
4 */
5 ?>
6 <?php get_header() ?>
7 <div id="container-mid">
8 <div id="main">
9 <div id="sidebar-left">
13ced2e @cpeckens Optimization
authored
10 <!--Subpage navigation-->
9865b2f @cpeckens Job Market Tweaks
authored
11 <?php
12 $parent = ksas_get_page_id('directoryindex');;
13 $children = wp_list_pages("title_li=&child_of=". $parent ."&echo=0&depth=1");
14
15 if ($children) { ?>
16 <ul id="subnav">
17 <li class="subnav-head">Also in <span class="highlight"><a href="<?php echo get_permalink($parent); ?>"><?php echo get_the_title($parent); ?></a></span></li>
18 <?php echo $children; ?>
19 </ul>
13ced2e @cpeckens Optimization
authored
20 <?php } ?>
21 <!--End Subpage Navigation code -->
9865b2f @cpeckens Job Market Tweaks
authored
22 <div id="address"><?php get_sidebar('address-sb'); ?></div>
23 </div> <!--End sidebar-left -->
24
25 <div id="content">
26 <div class="entry">
13ced2e @cpeckens Optimization
authored
27 <!--This is the page content -->
9865b2f @cpeckens Job Market Tweaks
authored
28 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!--Start the loop -->
29 <h2><?php the_title(); ?></h2>
30 <?php the_content(); ?>
31 <?php endwhile; ?>
32 <?php endif; ?>
33 <div class="directory-table">
34 <table>
35
36 <?php if(is_page('job-market')) : ?>
37 <!--Create query -->
13ced2e @cpeckens Optimization
authored
38 <?php // Get any existing copy of our transient data
39 if ( false === ( $my_candidate_query = get_transient( 'ksas_candidate_query' ) ) ) {
40 // It wasn't there, so regenerate the data and save the transient
41 $my_candidate_query = new WP_Query(array(
9865b2f @cpeckens Job Market Tweaks
authored
42 'post-type' => 'people',
43 'role' => 'job-market-candidate',
c83ebbc @cpeckens Tweaks and fixes
authored
44 'meta_key' => 'ecpt_people_alpha',
9865b2f @cpeckens Job Market Tweaks
authored
45 'orderby' => 'meta_value',
46 'order' => 'ASC',
13ced2e @cpeckens Optimization
authored
47 'posts_per_page' => '25'));
48 set_transient( 'ksas_candidate_query', $my_candidate_query, 86400 );
49 } ?>
9865b2f @cpeckens Job Market Tweaks
authored
50 <?php while ($my_candidate_query->have_posts()) : $my_candidate_query->the_post(); ?>
51
52
53 <tr>
27e9a9e @cpeckens Complete replacements for new custom meta prefixes
authored
54 <td><?php if ( get_post_meta($post->ID, 'ecpt_people_photo', true) ) : ?><a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, 'ecpt_people_photo', true); ?>" /></a><?php endif; ?></td>
9865b2f @cpeckens Job Market Tweaks
authored
55
27e9a9e @cpeckens Complete replacements for new custom meta prefixes
authored
56 <td><h4><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h4><?php if ( get_post_meta($post->ID, 'ecpt_phone', true) ) : ?> <?php echo get_post_meta($post->ID, 'ecpt_phone', true); ?><br><?php endif; ?>
57 <?php if ( get_post_meta($post->ID, 'ecpt_email', true) ) : ?><a href="mailto:<?php echo get_post_meta($post->ID, 'ecpt_email', true); ?>"> <?php echo get_post_meta($post->ID, 'ecpt_email', true); ?></a><?php endif; ?></p>
9865b2f @cpeckens Job Market Tweaks
authored
58 <div class="divider"></div>
27e9a9e @cpeckens Complete replacements for new custom meta prefixes
authored
59 <p class="candidates"><?php if ( get_post_meta($post->ID, 'ecpt_thesis', true) ) : ?><strong>Thesis Title: </strong>"<?php echo get_post_meta($post->ID, 'ecpt_thesis', true); ?>"<?php endif; ?><?php if ( get_post_meta($post->ID, 'ecpt_job_abstract', true) ) : ?>&nbsp;- <a href="<?php echo get_post_meta($post->ID, 'ecpt_job_abstract', true); ?>">Download Abstract (PDF)</a><?php endif; ?> </p>
60 <p class="candidates"><?php if ( get_post_meta($post->ID, 'ecpt_advisor', true) ) : ?><strong>Main Advisor: </strong><?php echo get_post_meta($post->ID, 'ecpt_advisor', true); ?><?php endif; ?></p>
61 <p class="candidates"><?php if ( get_post_meta($post->ID, 'ecpt_fields', true) ) : ?><strong>Fields: </strong><?php echo get_post_meta($post->ID, 'ecpt_fields', true); ?><?php endif; ?></p>
9865b2f @cpeckens Job Market Tweaks
authored
62
63 </td>
64
65 </tr>
66
67 <?php endwhile; ?>
68 <?php endif; ?>
69 </table>
70 </div> <!--end directory-table-->
71 <div class="pagination"><?php ksas_pagination('«', '»'); ?></div>
72 </div> <!--End entry-->
73 </div> <!--End content -->
74 <div class="clearboth"></div> <!--to have background work properly -->
75 </div> <!--End main -->
76
77 </div> <!--End container-mid -->
78
79
80 <?php get_footer() ?>
Something went wrong with that request. Please try again.