forked from hakkens/davehakkens
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbbpress.php
More file actions
76 lines (51 loc) · 2.46 KB
/
bbpress.php
File metadata and controls
76 lines (51 loc) · 2.46 KB
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
<?php
get_header();
get_template_part( 'navbar' );
?>
<div class="forum-sidebar">
<?php dynamic_sidebar( 'forum-sidebar' ); ?>
</div>
<div id="content" class="page-forum <?= str_replace( ' ', '-', strtolower( bbp_get_forum_title() ) ); ?>">
<div id="topbar">
<?php
if( function_exists( 'yoast_breadcrumb' ) ) {
$breadcrumbs = yoast_breadcrumb( '<p id="breadcrumbs">', '</p>', false );
$breadcrumbs = str_replace( PHP_EOL, '', $breadcrumbs );
$breadcrumbs = str_replace( '<a href="' . get_bloginfo( 'home' ) . '" rel="v:url" property="v:title">Home</a>', '<a href="' . get_bloginfo( 'home' ) . '/community/forums/" rel="v:url" property="v:title">Forums</a>', $breadcrumbs );
$breadcrumbs = str_replace( '<span typeof="v:Breadcrumb"><a href="' . get_bloginfo( 'home' ) . '/community/forums/" rel="v:url" property="v:title">Forums</a> <span rel="v:child" typeof="v:Breadcrumb"><a href="' . get_bloginfo( 'home' ) . '/community/forums/" rel="v:url" property="v:title">Forums</a>', '<span typeof="v:Breadcrumb"><a href="' . get_bloginfo( 'home' ) . '/community/forums/" rel="v:url" property="v:title">Forums</a>', $breadcrumbs );
$breadcrumbs = str_replace( '<span class="breadcrumb_last">Forums</span>', '', $breadcrumbs );
echo $breadcrumbs;
}
?>
</div>
<div class="post<?= get_field('headerimage') == '' ? ' no-headerimage' : '' ; ?>">
<?php if( get_field( 'headerimage' ) != '' ): ?>
<div style="background-image: url('<?= get_field( 'headerimage' ); ?>');" class="thumbnail">
<div class="shadow"></div>
<div class="meta">
<?php if( isset( $post_meta['subtitle'][0] ) ): ?>
<h3><?= $post_meta['subtitle'][0]; ?></h3>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if( get_field( 'headerimage' ) == ''): ?>
<div class="center">
<?php the_post_thumbnail( [ 120, 120 ] ); ?>
</div>
<?php if( $_SERVER['REQUEST_URI'] != '/community/forums/' ): ?>
<h1><?= str_replace( 'Reply To: ', '', get_the_title() ); ?></h1>
<?php endif; ?>
<?php endif; ?>
<div>
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>
<div class="alt-forum-sidebar">
<?php dynamic_sidebar( 'forum-sidebar' ); ?>
<div class="clearfix"></div>
</div>
</div>
</div>
<?php get_footer(); ?>