This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtemplate-team.php
executable file
·67 lines (48 loc) · 2.05 KB
/
template-team.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
<?php
/**
* Template Name: Team Members
* The template for displaying the team template.
*
* @package Spaces
* @link https://themebeans.com/themes/spaces
*/
get_header();
// PAGE META
$page_title = get_post_meta( $post->ID, '_bean_page_title', true );
$fullwidth_media = get_post_meta( $post->ID, '_bean_fullwidth_media', true );
$fullwidth_image = get_post_meta( $post->ID, '_bean_fullwidth_image', true );
$fullwidth_caption = get_post_meta( $post->ID, '_bean_fullwidth_caption', true );
// ADD CLASS IF NO IMAGE IS UPLOADED
if ( $fullwidth_media == 'on' && $fullwidth_image ) {
$image = 'full-img';
} else {
$image = '';
} ?>
<?php if ( $fullwidth_media == 'on' && $fullwidth_image ) { ?>
<div class="row">
<section id="post-<?php the_ID(); ?>" <?php post_class( 'fadein' ); ?>>
<div class="entry-content-media">
<?php echo '<img src=' . $fullwidth_image . '>'; ?>
<?php if ( $fullwidth_caption ) { ?>
<span class="bean-image-caption"><?php echo $fullwidth_caption; ?></span>
<?php } ?>
</div><!-- END .entry-content-media -->
</section><!-- END #post-<?php the_ID(); ?> -->
</div><!-- END .row -->
<?php
} //END $fullwidth_media == 'on' && $fullwidth_image
// CHECK IF THE BEAN-TEAM PLUGIN IS ACTIVE
if ( is_plugin_active( 'bean-team/bean-team.php' ) or is_plugin_active( 'bean-team-members/bean-team.php' ) ) {
?>
<div class="row portfolio">
<?php get_template_part( 'content', 'team' ); ?>
</div><!-- END .row.portfolio -->
<?php } else { // IF IT'S NOT, SHOW THIS NOTIFICATION ?>
<?php if ( is_user_logged_in() ) { ?>
<h1 class="text-centered"><?php _e( 'Plugin Not Found', 'spaces' ); ?></h1>
<p class="text-centered"><?php _e( 'It looks like you have not installed or activated the Bean Team Members plugin.', 'spaces' ); ?></p>
<p class="text-centered"><?php _e( 'Head to your ', 'spaces' ); ?><a href="<?php echo home_url( '/wp-admin/themes.php?page=install-required-plugins' ); ?>"><?php _e( 'Dashboard', 'spaces' ); ?></a><?php _e( ' to fix this.', 'spaces' ); ?></p>
<?php } ?>
<?php
}
get_footer();