| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying pages |
|---|
| 4 | * |
|---|
| 5 | * This is the template that displays all pages by default. |
|---|
| 6 | * Please note that this is the WordPress construct of pages and that |
|---|
| 7 | * other "pages" on your WordPress site will use a different template. |
|---|
| 8 | * |
|---|
| 9 | */ |
|---|
| 10 | |
|---|
| 11 | get_header(); ?> |
|---|
| 12 | |
|---|
| 13 | <div id="main-content-wrapper"> |
|---|
| 14 | |
|---|
| 15 | <div id="main-content"> |
|---|
| 16 | |
|---|
| 17 | <?php if ( have_posts() ) : |
|---|
| 18 | |
|---|
| 19 | while ( have_posts() ) : |
|---|
| 20 | |
|---|
| 21 | the_post(); |
|---|
| 22 | |
|---|
| 23 | // includes the single page content templata here |
|---|
| 24 | get_template_part( 'template-parts/content', 'page' ); |
|---|
| 25 | |
|---|
| 26 | // if comments are open or there's at least one comment, load up the comment template. |
|---|
| 27 | if ( comments_open() || get_comments_number() ) { |
|---|
| 28 | comments_template(); |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | endwhile; |
|---|
| 32 | |
|---|
| 33 | else : |
|---|
| 34 | |
|---|
| 35 | // if no content is loaded, show the 'no found' template |
|---|
| 36 | get_template_part( 'template-parts/content', 'none' ); |
|---|
| 37 | |
|---|
| 38 | endif; ?> |
|---|
| 39 | |
|---|
| 40 | </div><!-- #main-content --> |
|---|
| 41 | |
|---|
| 42 | <?php get_sidebar(); ?> |
|---|
| 43 | |
|---|
| 44 | </div><!-- #main-content-wrapper --> |
|---|
| 45 | |
|---|
| 46 | <?php get_footer(); ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.