-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
76 lines (61 loc) · 2.08 KB
/
page.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
<?php
/**
* The template for displaying all pages
*
* @package SimpleMag
* @since SimpleMag 1.2
**/
get_header();
global $ti_option;
?>
<section id="content" role="main" class="clearfix animated">
<?php
/**
* If Featured Image is uploaded set it as a background
* and change page title color to white
**/
if ( has_post_thumbnail() ) {
$page_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'big-size' );
} ?>
<header class="entry-header page-header">
<div class="wrapper title-with-sep">
<h1 class="entry-title"><?php the_title(); ?></h1>
</div>
<div class="au_staff_title">
<img src="<?php echo $page_image_url[0] ?>">
</div>
</header>
<div class="wrapper">
<?php
// Enable/Disable sidebar based on the field selection
if ( ! get_field( 'page_sidebar' ) || get_field( 'page_sidebar' ) == 'page_sidebar_on' ):
?>
<div class="grids">
<div class="grid-8 column-1">
<?php endif; ?>
<?php
if (have_posts()) : while (have_posts()) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="page-content">
<?php the_content(); ?>
</div>
</article>
<?php endwhile; endif; ?>
<?php
// Enable/Disable comments
if (comments_open($post->ID)) {
comments_template('/comments.php');
}
?>
<?php
// Enable/Disable sidebar based on the field selection
if ( ! get_field( 'page_sidebar' ) || get_field( 'page_sidebar' ) == 'page_sidebar_on' ):
?>
</div><!-- .grid-8 -->
<?php get_sidebar(); ?>
</div><!-- .grids -->
<?php endif; ?>
</div>
</section><!-- #content -->
<?php get_footer(); ?>