-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
84 lines (59 loc) · 1.52 KB
/
single.php
File metadata and controls
84 lines (59 loc) · 1.52 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
77
78
79
80
81
82
83
84
<?php
get_header();
if ( have_posts() ) {
while ( have_posts() ) { the_post();
get_template_part( 'inc/breadcrumbs' );
$override = get_field( 'title_override' );
$title = $override ? $override : get_the_title();
?>
<div class="twocol">
<div class="twocol-side">
<div>
<h1><?= wp_kses_post( $title ); ?></h1>
<?php
$blogCats = get_the_terms( get_the_ID(), 'categories' );
if ( $blogCats ) {
?>
<p class="has-hl">
<?php
foreach ( $blogCats as $blogCat ) {
?>
<a href="<?= add_query_arg( array( 'categories' => $blogCat->slug ), get_permalink( get_page_by_path( 'blog' ) ) ); ?>"><?= esc_html( $blogCat->name ); ?></a>
<?php
}
?>
</p>
<?php
}
?>
<p><?= get_the_date( get_option( 'date_format' ) ); ?></p>
</div>
<?php
if ( have_rows( 'sidebar_blocks' ) ) {
while ( have_rows( 'sidebar_blocks' ) ) { the_row();
get_template_part( 'inc/sidebar-block', get_row_layout() );
}
}
?>
</div>
<div class="twocol-main" id="page-content">
<div class="mainplain">
<!-- <p><?= get_the_date( get_option( 'date_format' ) ); ?></p> -->
<?php
the_content();
?>
</div>
<?php
$globalPromoBox = get_field( 'global_promo_box', 'options' );
if ( $globalPromoBox['enabled'] && ! get_field( 'disable_global_promo_box' ) ) {
get_template_part( 'inc/block', 'promo_box', $globalPromoBox );
}
?>
</div>
</div>
<?php
}
get_template_part( 'inc/backtotop' );
}
get_footer();
?>