-
Notifications
You must be signed in to change notification settings - Fork 0
/
buddypress.php
executable file
·52 lines (36 loc) · 1.78 KB
/
buddypress.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
<?php get_header();
global $post;
$has_sidebar = 3;
if ($post) {
$layout = get_field('layout', $post->ID);
if(!($layout != 'fullpage' && is_active_sidebar( 'buddypress' ))) {
$has_sidebar = 0;
}
}
?>
<div class="col-sm-<?php echo 12 - $has_sidebar; ?> <?php echo ($has_sidebar > 0 ? 'col-sm-pull-3' : ''); ?>">
<?php while ( have_posts() ) : the_post(); $postid = get_the_ID(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- Display featured image in right-aligned floating div -->
<div class="single_img_wrap <?php echo (!has_post_thumbnail() ? 'noimg' : ''); ?>">
<?php
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'large');
$img_info = wp_get_attachment_metadata( get_post_thumbnail_id(get_the_ID()) );
echo '
<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" class="featuredimglink fancybox" >';
echo get_the_post_thumbnail(get_the_ID(), 'blog');
echo '</a>';
if ($img_info['image_meta']['caption'] != '') {
echo '<p>'. $img_info['image_meta']['caption'] .'</p>';
}
}
?>
</div>
<div class="entry-content"><?php the_content(); ?></div>
</article>
<?php // comments_template(); ?>
<?php endwhile; ?>
</div>
<?php wp_reset_query(); ?>
<?php get_footer(); ?>