Skip to content

Commit 2d1c778

Browse files
committed
Initiate the loop before the title is called on pages. Failing to do so causes checks that run on the loop's status to fail.
1 parent dbb8093 commit 2d1c778

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

page.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
<?php get_template_part('templates/page', 'header'); ?>
2-
<?php get_template_part('templates/content', 'page'); ?>
1+
<?php while (have_posts()) : the_post(); ?>
2+
<?php get_template_part('templates/page', 'header'); ?>
3+
<?php get_template_part('templates/content', 'page'); ?>
4+
<?php endwhile; ?>

templates/content-page.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
<?php while (have_posts()) : the_post(); ?>
2-
<?php the_content(); ?>
3-
<?php wp_link_pages(array('before' => '<nav class="pagination">', 'after' => '</nav>')); ?>
4-
<?php endwhile; ?>
1+
<?php the_content(); ?>
2+
<?php wp_link_pages(array('before' => '<nav class="pagination">', 'after' => '</nav>')); ?>

0 commit comments

Comments
 (0)