-
Notifications
You must be signed in to change notification settings - Fork 0
/
p-facultyexperts.php
87 lines (76 loc) · 2.77 KB
/
p-facultyexperts.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
<?php
/*
Template Name: Faculty experts
*/
get_header(); ?>
</div> <!-- content wrapper -->
<div class="color-background-title">
<div class="row">
<div class="large-12 columns">
<?php if (have_posts()):
while (have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php endwhile;
endif; ?>
</div>
</div>
</div>
<div class="content-wrapper">
<div class="row">
<div class="large-8 columns">
<h3>Search by name or keyword</h3>
<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>category/faculty-experts">
<label>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder' ) ?>" value="<?php echo get_search_query() ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" />
</label>
<input type="submit" class="search-submit button" value="<?php echo esc_attr_x( 'Search', 'submit button' ) ?>" />
</form>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'cat' => '9',
'posts_per_page' => 10,
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
'orderby' => 'meta_value',
'order' => 'ASC',
'meta_key' => 'lastname',
'meta_query' => array(
array(
'key' => 'lastname',
'value' => null,
'compare' => '!=' // Make sure the user's job title field has a value (i.e. job_title != null)
)
), // End of meta_query
'fields' => 'ID',
'exclude' => array(
1
),
);
query_posts ($args); ?>
<div class="pagination-centered">
<ul class="text-center pagination">
<?php wpbeginner_numeric_posts_nav(); ?>
<!--<div class="alignleft"><?php previous_posts_link('« Previous') ?></div>
<div class="alignright"><?php next_posts_link('More »') ?></div>-->
</ul>
</div>
<hr>
<?php while ( have_posts()) : the_post(); ?>
<div class="thumb faculty left">
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail(); ?></a>
<?php endif; ?>
</div>
<h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
<em><?php echo get_post_meta($post->ID, 'title', true) ?></em><br>
<em><?php echo get_post_meta($post->ID, 'department', true) ?></em>
<hr>
<?php endwhile ?>
<?php wp_reset_query(); // Restore global post data
?>
</div>
<div class="large-4 columns">
<?php dynamic_sidebar( 'affiliates' ); ?>
</div>
</div>
<?php get_footer(); ?>