-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.php
More file actions
48 lines (45 loc) · 1.47 KB
/
base.php
File metadata and controls
48 lines (45 loc) · 1.47 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
<?php
global $post;
get_template_part('templates/head');
?>
<body data-spy="scroll" data-target="#sidebar-nav-spy" <?php body_class(''); ?>>
<?php
if (locate_template('templates/pre-header.php') != '') {
get_template_part('templates/pre-header');
}
do_action('get_header' , 'header');
// Special Header for Named Post
if ( !empty( $post->post_name ) && locate_template('templates/header-' . $post->post_name . '.php') != '') {
get_template_part('templates/header', $post->post_name);
// Special Header for Post Type
} elseif ( !empty( $post->post_type ) && locate_template('templates/header-' . $post->post_type . '.php') != '') {
get_template_part('templates/header', $post->post_type);
// Generic Header
} else {
get_template_part('templates/header');
}
?>
<div class="wrap container" role="document">
<div class="content row">
<main class="main" role="main">
<?php include roots_template_path(); ?>
</main><!-- /.main -->
<?php if (roots_display_sidebar()) : ?>
<aside class="sidebar" role="complementary">
<?php include roots_sidebar_path(); ?>
</aside><!-- /.sidebar -->
<?php endif; ?>
</div><!-- /.content -->
</div><!-- /.wrap -->
<?php
if ( !empty( $post->post_name ) && locate_template('templates/footer-' . $post->post_name . '.php') != '') {
get_template_part('templates/footer', $post->post_name);
} else {
get_template_part('templates/footer');
}
wp_footer();
?>
</body>
</html>
<?php
?>