-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.php
65 lines (44 loc) · 1.59 KB
/
base.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
<?php get_template_part('templates/head'); ?>
<!-- if viewing a single artworks post,
check what type of artwork it is,
and add black background class for
videos or gallery types -->
<?php
if ( is_singular( 'artworks' ) ) {
// get artworks type (custom field)
$aw_type = get_field( "artwork_type" );
switch ($aw_type) {
case 'video_artwork':
case 'image_gallery_artwork':
case 'text_only_artwork':
$body_class = "bg-black";
break;
default:
$body_class = "regular-artwork";
break;
}
}
?>
<body <?php if (isset($body_class)) {body_class($body_class);} else { body_class(); }; ?>>
<!--[if lt IE 8]>
<div class="alert-box warning">
<?php _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'roots'); ?>
</div>
<![endif]-->
<?php
do_action('get_header');
get_template_part('templates/header');
?>
<div class="content row <?php echo isset($bg_class) ? $bg_class: '';?>" id="post-content" role="document">
<main class="main <?php echo roots_main_class(); ?> columns" role="main">
<?php include roots_template_path(); ?>
</main><!-- /.main -->
<?php if (roots_display_sidebar()) : ?>
<aside class="sidebar <?php echo roots_sidebar_class(); ?> columns" role="complementary">
<?php include roots_sidebar_path(); ?>
</aside><!-- /.sidebar -->
<?php endif; ?>
</div><!-- /.content -->
<?php get_template_part('templates/footer'); ?>
</body>
</html>