-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpage.php
More file actions
62 lines (60 loc) · 1.8 KB
/
Copy pathpage.php
File metadata and controls
62 lines (60 loc) · 1.8 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
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Anaglyph_Theme
* @since Anaglyph Theme 1.0
*/
get_header(); ?>
<?php
global $prefix;
$layout = 0;
$page_layout = get_post_meta(get_the_ID(), $prefix.'page_layout', true);
if (!empty($page_layout)) $layout = $page_layout;
// Start the Loop.
while ( have_posts() ) : the_post(); ?>
<?php do_action('anaglyph_before_page_content')?>
<section id="page-content" class="block">
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="content" role="main">
<?php
if ($layout == 0) {
get_template_part( 'content', 'page' );
do_action('anaglyph_comments_template');
} else if ($layout == 1) {
echo '<div class="row">';
echo '<div class="col-md-8">';
get_template_part( 'content', 'page' );
do_action('anaglyph_comments_template');
echo '</div>';
echo '<div class="col-md-4">';
get_sidebar_part();
echo '</div>';
echo '</div>';
} else if ($layout == 2) {
echo '<div class="row">';
echo '<div class="col-md-4">';
get_sidebar_part();
echo '</div>';
echo '<div class="col-md-8">';
get_template_part( 'content', 'page' );
do_action('anaglyph_comments_template');
echo '</div>';
echo '</div>';
}
?>
</div>
</div>
</div>
</div>
</section>
<?php endwhile; ?>
<?php
get_footer();