-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
page.php
46 lines (33 loc) · 1.51 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
<?php
/**
* The template for displaying any single page.
*
*/
get_header(); // This fxn gets the header.php file and renders it ?>
<div id="primary" class="row-fluid">
<div id="content" role="main" class="span8 offset2">
<?php if ( have_posts() ) :
// Do we have any posts/pages in the databse that match our query?
?>
<?php while ( have_posts() ) : the_post();
// If we have a page to show, start a loop that will display it
?>
<article class="post">
<h1 class="title"><?php the_title(); // Display the title of the page ?></h1>
<div class="the-content">
<?php the_content();
// This call the main content of the page, the stuff in the main text box while composing.
// This will wrap everything in p tags
?>
<?php wp_link_pages(); // This will display pagination links, if applicable to the page ?>
</div><!-- the-content -->
</article>
<?php endwhile; // OK, let's stop the page loop once we've displayed it ?>
<?php else : // Well, if there are no posts to display and loop through, let's apologize to the reader (also your 404 error) ?>
<article class="post error">
<h1 class="404">Nothing posted yet</h1>
</article>
<?php endif; // OK, I think that takes care of both scenarios (having a page or not having a page to show) ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_footer(); // This fxn gets the footer.php file and renders it ?>