This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-people.php
104 lines (95 loc) · 6.19 KB
/
single-people.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
<?php
/**
* The template for displaying all single posts.
*
* @package tsatu
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
get_header(); ?>
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class(); ?>>
<header>
<div class="entry-title"><h1><?php the_title(); ?></h1></div>
</header>
<div class="entry-content">
<div class="row">
<div class="col-md-4">
<?php if ( has_post_thumbnail() ) {
echo get_the_post_thumbnail(get_the_ID(), 'full', array('class' => "img-responsive"));
} else { ?>
<img class="img-responsive wp-post-image" src="<?php echo get_template_directory_uri() ?>/assets/img/nophoto.jpg" />
<?php } ?>
</div>
<div class="col-md-8">
<div class="well people-info">
<table>
<tr>
<td class="head"><?php echo _x('Position', 'Taxonomy Singular Name', 'tsatu'); ?>:</td>
<td width="100%"><?php echo the_terms_list(get_the_ID(), 'people_position'); ?></td>
</tr>
<?php if (the_terms_list(get_the_ID(), 'people_degree') != '') : ?>
<tr>
<td class="head"><?php echo _x('Degree', 'Taxonomy Singular Name', 'tsatu'); ?>:</td>
<td><?php echo the_terms_list(get_the_ID(), 'people_degree'); ?></td>
</tr>
<?php endif; ?>
<?php if (the_terms_list(get_the_ID(), 'people_title') != '') : ?>
<tr>
<td class="head"><?php echo _x('Title', 'Taxonomy Singular Name', 'tsatu'); ?>:</td>
<td><?php echo the_terms_list(get_the_ID(), 'people_title'); ?></td>
</tr>
<?php endif; ?>
<tr>
<td colspan="2">
<?php if (get_post_meta( get_the_ID(), 'people_office', true ) != '') : ?>
<div class="people-contacts"><i class="fa fa-building"></i><?php echo esc_attr( get_post_meta( get_the_ID(), 'people_office', true ) ); ?></div>
<?php endif; ?>
<?php if (get_post_meta( get_the_ID(), 'people_phone', true ) != '') : ?>
<div class="people-contacts"><i class="fa fa-phone"></i><?php echo esc_attr( get_post_meta( get_the_ID(), 'people_phone', true ) ); ?></div>
<?php endif; ?>
<?php if (get_post_meta( get_the_ID(), 'people_email', true ) != '') : ?>
<div class="people-contacts"><i class="fa fa-envelope"></i><a href="mailto:<?php echo esc_attr( get_post_meta( get_the_ID(), 'people_email', true ) ); ?>"><?php echo esc_attr( get_post_meta( get_the_ID(), 'people_email', true ) ); ?></a></div>
<?php endif; ?>
</td>
</tr>
<tr>
<td colspan="2">
<?php if (get_post_meta( get_the_ID(), 'people_moodle', true ) != '') : ?>
<a href="<?php echo esc_attr( get_post_meta( get_the_ID(), 'people_moodle', true ) ); ?>" class="people-social" title="<?php _e('Education and Information Portal of TSATU', 'tsatu'); ?>" target="_blank"><i class="social_icon fa fa-external-link-square"></i></a>
<?php endif; ?>
<?php if (get_post_meta( get_the_ID(), 'people_facebook', true ) != '') : ?>
<a href="<?php echo esc_attr( get_post_meta( get_the_ID(), 'people_facebook', true ) ); ?>" class="people-social" title="Facebook" target="_blank"><i class="social_icon fa fa-facebook-square"></i></a>
<?php endif; ?>
<?php if (get_post_meta( get_the_ID(), 'people_google', true ) != '') : ?>
<a href="<?php echo esc_attr( get_post_meta( get_the_ID(), 'people_google', true ) ); ?>" class="people-social" title="Google+" target="_blank"><i class="social_icon fa fa-google-plus-square"></i></a>
<?php endif; ?>
<?php if (get_post_meta( get_the_ID(), 'people_twitter', true ) != '') : ?>
<a href="<?php echo esc_attr( get_post_meta( get_the_ID(), 'people_twitter', true ) ); ?>" class="people-social" title="Twitter" target="_blank"><i class="social_icon fa fa-twitter-square"></i></a>
<?php endif; ?>
<?php if (get_post_meta( get_the_ID(), 'people_linkedin', true ) != '') : ?>
<a href="<?php echo esc_attr( get_post_meta( get_the_ID(), 'people_linkedin', true ) ); ?>" class="people-social" title="LinkedIn" target="_blank"><i class="social_icon fa fa-linkedin-square"></i></a>
<?php endif; ?>
</td>
</tr>
</table>
</div>
</div>
</div>
<?php the_content(); ?>
</div>
<footer>
<?php wp_link_pages(array('before' => '<nav class="page-nav"><p>' . __('Pages:', 'tsatu'), 'after' => '</p></nav>')); ?>
</footer>
</article>
<?php
// If comments are open or we have at least one comment, load up the comment template
if (comments_open() || get_comments_number()) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
<?php get_sidebar('people'); ?>
<?php get_footer(); ?>