forked from themebeans/trim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
executable file
·59 lines (45 loc) · 1.31 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
<?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 Trim
* @link https://themebeans.com/themes/trim
*/
get_header();
$page_title = get_post_meta( $post->ID, '_bean_page_title', true );
$page_layout = get_post_meta( $post->ID, '_bean_page_layout', true ); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( "single-page $page_layout" ); ?>>
<?php if ( ( function_exists( 'has_post_thumbnail' ) ) && ( has_post_thumbnail() ) ) { ?>
<?php the_post_thumbnail( 'post-feat' ); ?>
<?php } ?>
<div class="inner">
<div class="entry-content">
<?php
if ( 'on' === $page_title ) {
?>
<h1 class="entry-title"><?php the_title( '' ); ?></h1>
<?php } ?>
<?php
while ( have_posts() ) :
the_post();
the_content();
endwhile;
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'trim' ) . '</span>',
'after' => '</div>',
)
);
?>
</div>
</div>
</article>
<?php
if ( $page_layout === 'page_sidebar' or $page_layout === 'page_fullwidth_sidebar' ) {
dynamic_sidebar( 'internal-sidebar' );
}
get_footer();