-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive-staff.php
80 lines (67 loc) · 3.24 KB
/
archive-staff.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
<?php
/**
* @package WordPress
*
* The Template for displaying all staff single posts or pulling in staff web service for counties.
*
* @package WordPress
* @subpackage agriflex
* @since agriflex 1.0
*/
get_header(); ?>
<div id="wrap">
<div id="content" role="main">
<h1 class="entry-title">Staff</h1>
<div class="staff-search-form">
<label>
<h4>Search Staff Database</h4>
</label>
<form role="search" class="searchform" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<input type="text" class="s" name="s" id="s" placeholder="Wilber B. Snodgrass" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/><br />
<input type="hidden" name="post_type" value="staff" />
</form>
</div>
<ul class="staff-listing-ul">
<?php
$args = array(
'post_type' => 'staff',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC'
);
$my_query = new WP_Query($args);
// The Loop
while ($my_query->have_posts()) : $my_query->the_post();
$my_meta = get_post_meta($post->ID,'_my_meta',TRUE);
?>
<li class="staff-listing-item">
<div class="role staff-container">
<a href="<?php the_permalink(); ?>" rel="bookmark">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail('staff_archive');
} else {
echo '<img src="'.get_bloginfo("template_url").'/images/AgriLife-default-staff-image.png?v=100" alt="AgriLife Logo" title="AgriLife" />';
}
?></a>
<hgroup class="staff-head">
<h2 class="staff-title" title="<?php the_title(); ?>"><a href="<?php the_permalink(); ?>"><?php echo $my_meta['firstname'].' '.$my_meta['lastname']; ?></a></h2>
<h3 class="staff-position"><?php echo $my_meta['position']; ?></h3>
</hgroup>
<div class="staff-contact-details">
<p class="staff-phone tel"><?php echo $my_meta['phone']; ?></p>
<p class="staff-email email"><a href="mailto:<?php echo $my_meta['email']; ?>"><?php echo $my_meta['email']; ?></a></p>
</div>
</div>
</a>
</li>
<?php endwhile; ?>
</ul>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('Previous entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next entries') ?></div>
</div>
<?php wp_reset_query(); ?>
</div><!-- #content -->
</div><!-- #wrap -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>