So I'm trying to integrate static HTML/CSS/JS into WordPress and everything goes really well, but now I realised that my footer isn't displaying in my individual static pages (page.php). But I can see my footer in front (index) page and in my custom contact form page.
This is my page.php file:
<?php get_header(); ?>
<!-- Page Content-->
<div id="content" class="snap-content">
<div class="header-clear"></div>
<div class="content">
<div class="container no-bottom">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<p><?php the_content(); ?></p>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>
I also have index.php and front-page.php files (both have <?php get_header(); ?>
and <?php get_footer(); ?>
functions).
And yes, in my footer.php I'm calling <?php wp_footer(); ?>
right before the closing tag.
Appreciate any help.
EDIT: I've tried a lot of different variations and wirte some dummy static html content inside page.php, but whatever I do and change, I can't make footer appear.
EDIT 2: Why it's happening?
So I'm trying to integrate static HTML/CSS/JS into WordPress and everything goes really well, but now I realised that my footer isn't displaying in my individual static pages (page.php). But I can see my footer in front (index) page and in my custom contact form page.
This is my page.php file:
<?php get_header(); ?>
<!-- Page Content-->
<div id="content" class="snap-content">
<div class="header-clear"></div>
<div class="content">
<div class="container no-bottom">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<p><?php the_content(); ?></p>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>
I also have index.php and front-page.php files (both have <?php get_header(); ?>
and <?php get_footer(); ?>
functions).
And yes, in my footer.php I'm calling <?php wp_footer(); ?>
right before the closing tag.
Appreciate any help.
EDIT: I've tried a lot of different variations and wirte some dummy static html content inside page.php, but whatever I do and change, I can't make footer appear.
EDIT 2: Why it's happening?
Share Improve this question edited Apr 29, 2015 at 17:17 Deimantas Brandišauskas asked Apr 29, 2015 at 15:50 Deimantas BrandišauskasDeimantas Brandišauskas 1011 silver badge3 bronze badges 5 |1 Answer
Reset to default -1Try to use include("footer.php");
And I see your
<div id="content" class="snap-content">
didn't have close tag </div>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744751423a4591619.html
define('WP_DEBUG',true);
in wp-config.php and post any errors that you encountered. – m4n0 Commented Apr 29, 2015 at 15:54Why it's happening?
Can you elaborate what's happening since footer is displayed there. – m4n0 Commented Apr 29, 2015 at 17:25