-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive-faculty.php
94 lines (72 loc) · 2.4 KB
/
archive-faculty.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
<?php
/**
* The template for displaying Archive pages
*/
get_header();
?>
<div class="page-title group">
<div class="wrap">
<div class="quarter"> </div>
<div class="three-quarter">
<h1>Faculty Directory</h1>
</div>
</div>
</div>
<section id="primary" class="content-area wrap group" role="main">
<div class="quarter left-menu">
<button class="toggle-sidebar-menu">Section Navigation</button>
<div class="sidebar-menu-container">
<div class="menu-primary">
<h5 class="menu-title">Academics</h5>
<?php wp_nav_menu( array( 'theme_location' => 'academics-primary', 'menu_class' => 'nav-menu' ) ); ?>
</div>
<div class="menu-buttons"><?php wp_nav_menu( array( 'theme_location' => 'academics-buttons', 'menu_class' => 'nav-menu' ) ); ?></div>
</div>
</div>
<div class="three-quarter">
<div class="faculty-search-widget-container faculty-search">
<input type="text" value="<?php print ( isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : "" ) ?>" name="s" id="s" placeholder="Search Name, Academic Department Or Area of Interest">
</div>
<?php
global $wp_query;
$wp_query->query_vars["posts_per_page"] = 200;
$wp_query->query_vars["post_type"] = 'faculty';
$wp_query->query_vars["orderby"] = 'meta_value';
$wp_query->query_vars['meta_key'] = '_p_faculty_lname';
$wp_query->query_vars["order"] = 'ASC';
$wp_query->get_posts();
if ( have_posts() ) :
?>
<div class="faculty-directory">
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
?>
<div class="faculty-entry visible">
<?php the_post_thumbnail(); ?>
<div class="info">
<a href="<?php the_permalink(); ?>" class="btn"><i class="fa fa-lg fa-search"></i></a>
<h4><a href="<?php the_permalink() ?>"><?php print get_cmb_value( "faculty_lname" ); ?>, <?php print get_cmb_value( "faculty_fname" ); ?></a></h4>
<p class="faculty-title"><?php print get_cmb_value( "faculty_title" ); ?></p>
<a href="mailto:<?php print get_cmb_value( "faculty_email" ); ?>"><?php print get_cmb_value( "faculty_email" ); ?></a>
</div>
</div>
<?php
endwhile;
?>
<div class="pagination">
<?php echo paginate_links(); ?>
</div>
<?php
else :
?>
<p>No results for that search term.</p>
<?php
endif;
?>
</div>
</div>
</section><!-- #primary -->
<?php
get_footer();
?>