-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpage.php
28 lines (28 loc) · 860 Bytes
/
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
<?php get_header();
if ( \PressbooksBook\Helpers\is_book_public() ) :
if ( have_posts() ) {
the_post();
} ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) : ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php else : ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php endif; ?>
<div class="entry-content">
<?php edit_post_link( __( 'Edit', 'pressbooks-book' ), '<span class="edit-link">', '</span>' ); ?>
<?php the_content(); ?>
<?php
wp_link_pages(
[
'before' => '<div class="page-link">' . __( 'Pages:', 'pressbooks-book' ),
'after' => '</div>',
]
);
?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php else : ?>
<?php get_template_part( 'private' ); ?>
<?php endif; ?>
<?php get_footer(); ?>