-
Notifications
You must be signed in to change notification settings - Fork 1
/
page.php
60 lines (48 loc) · 1.41 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
<?php
/**
* page.php
*
* Template for displaying all pages.
*/
?>
<?php get_header(); ?>
<div class="main-content col-md-8" role="main">
<?php while( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- article header -->
<header class="entry-header"><?php
// if post has thumbnail and not password protected
// show the post thumbnail
if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<figure class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</figure>
<?php endif; ?>
<!-- page title -->
<h1><?php the_title(); ?></h1>
</header>
<!-- article content -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
</div> <!-- .entry-content -->
<!-- article footer -->
<footer class="entry-footer">
<?php
// post edit link
if ( is_user_logged_in() ) {
echo '<p>';
edit_post_link( __( 'Edit', 'opal' ), '<span class="meta-edit">', '</span>' );
echo '</p>';
}
?>
</footer> <!-- .entry-footer -->
</article>
<!-- page comments -->
<?php comments_template(); ?>
<?php endwhile; ?>
</div> <!-- .main-content -->
<!-- get the sidebar.php -->
<?php get_sidebar(); ?>
<!-- get the footer.php -->
<?php get_footer(); ?>