php - Single Page WP Theme -
so i'm building wp 1 page theme , want each page display on static front-page. user able add/edit content of page in dashboard versus markup. when view page template the_content() working advertised, when require page template on static front-page, else shows the_content() blank. ideas?? thanks!
work.php file
// work template page -- the_content() works <!-- works --> <section id="works"> <!-- container --> <div class="container"> <!-- row --> <div class="row"> <!-- head --> <div class="head big wow bouncein"> <h3>our <span class="blue">works</span> </h3> <div class="head-break-line"> <span class="head-line-blue"></span> </div> <?php if ( have_posts() ) : while( have_posts() ) : the_post(); ?> <h6 class="subtext"><?php the_content(); ?></h6> <?php endwhile; endif; ?> </div>
front-page.php file
// static front-page -- every thing works, the_content() blank on page <?php require('work.php'); ?>
you requiring
page, you've closed loop supplies post you. see here ->
<?php endwhile; endif; ?>
then perform
<?php require('work.php'); ?>
this never work. need perform loop again doing:
<?php if ( have_posts() ) : while( have_posts() ) : the_post(); ?>
from within work.php
file.
Comments
Post a Comment