-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
79 lines (61 loc) · 2.58 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
77
78
79
<?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 Bucket Lite
* @since Bucket Lite 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
get_header(); ?>
<div class="container container--main">
<div class="grid">
<?php
// let's get to know this post a little better
$full_width_featured_image = get_post_meta( wpgrade::lang_post_id( get_the_ID() ), '_bucket_full_width_featured_image', true);
$disable_sidebar = get_post_meta( wpgrade::lang_post_id( get_the_ID() ), '_bucket_disable_sidebar', true);
// let's use what we know
$the_content_width = $disable_sidebar == 'on' ? 'one-whole' : 'lap-and-up-two-thirds';
$featured_image_width = ($full_width_featured_image == 'on' || $disable_sidebar == 'on') ? 'one-whole' : 'two-thirds palm-and-up-one-whole';
?>
<?php get_template_part('theme-partials/post-templates/header-single', get_post_format()); ?>
<div class="grid__item main float--left <?php echo $the_content_width; ?>">
<?php while ( have_posts() ){
the_post(); ?>
<article <?php post_class(); ?>>
<h1 class="article__title article__title--single"><?php the_title(); ?></h1>
<?php
the_content();
$args = array(
'before' => "<ol class=\"nav pagination\"><!--",
'after' => "\n--></ol>",
'next_or_number' => 'next_and_number',
'previouspagelink' => esc_html__('Previous', 'bucket-lite'),
'nextpagelink' => esc_html__('Next', 'bucket-lite')
);
wp_link_pages( $args ); ?>
<hr class="separator separator--section">
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() ) {
comments_template();
}
?>
</article>
<?php } ?>
</div><!--
<?php if ('on' != $disable_sidebar ){ ?>
--><div class="grid__item one-third palm-one-whole sidebar">
<?php get_sidebar(); ?>
</div>
<?php } else{ // ugly ?>
-->
<?php } ?>
</div>
</div>
<?php get_footer();