-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
55 lines (47 loc) · 1.56 KB
/
page.php
File metadata and controls
55 lines (47 loc) · 1.56 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
<?php get_header(); ?>
<?php
if (!is_front_page() && !is_home()) {
// echo the background image
$grandparent = top_parent_with_thumbnail(); ?>
<?php if (has_post_thumbnail( $grandparent )) {
$bgImage = wp_get_attachment_image_src( get_post_thumbnail_id( $grandparent ), 'background' );
$bgImage = $bgImage[0];
} ?>
<div id="content-wrapper">
<div id="page-header" <?php if ($bgImage) echo 'data-url="' . $bgImage . '" class="background"' ; ?>>
<!-- <section id="nav-section">
<nav>
<ul>
<?php wp_list_pages ( array(
'child_of' => $grandparent,
'depth' => 1,
'title_li' => ''
));
?>
</ul>
</nav>
</section>
-->
</div>
<?php } ?>
<?php roots_content_before(); ?>
<div id="content" class="<?php echo CONTAINER_CLASSES; ?>">
<?php roots_main_before(); ?>
<div id="main" class="<?php echo MAIN_CLASSES; ?>" role="main">
<?php roots_loop_before(); ?>
<?php get_template_part('loop', 'page'); ?>
<?php roots_loop_after(); ?>
<?php edit_post_link('Edit this page', '<p>', '</p>'); ?>
</div><!-- /#main -->
<?php roots_main_after(); ?>
<?php roots_sidebar_before(); ?>
<aside id="sidebar" class="<?php echo SIDEBAR_CLASSES; ?>" role="complementary">
<?php roots_sidebar_inside_before(); ?>
<?php get_sidebar(); ?>
<?php roots_sidebar_inside_after(); ?>
</aside><!-- /#sidebar -->
<?php roots_sidebar_after(); ?>
</div><!-- /#content -->
</div>
<?php roots_content_after(); ?>
<?php get_footer(); ?>