Footer doesn't display in page.php

So I'm trying to integrate static HTMLCSSJS into WordPress and everything goes really well, but now I realised th

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 Enable Debug mode by using define('WP_DEBUG',true); in wp-config.php and post any errors that you encountered. – m4n0 Commented Apr 29, 2015 at 15:54
  • I added this line in my wp-config.php and there was no such file. So I created it manually and installed "Log Viewer" plug-in and it's absolutelly empty. I set my permissions to 777 (for testing) - still empty. I've also tried to create php-errors.log file and it's empty too. So, as I understand, where are no errors. – Deimantas Brandišauskas Commented Apr 29, 2015 at 16:36
  • I have edited the main thread (EDIT 2). – Deimantas Brandišauskas Commented Apr 29, 2015 at 17:17
  • Why it's happening? Can you elaborate what's happening since footer is displayed there. – m4n0 Commented Apr 29, 2015 at 17:25
  • 1 I mean I was very "surprised" to see footer at the top of the page. I wrote a solution to this problem to another users answer. Thank you, Manor, for your collaboration with my problem :) – Deimantas Brandišauskas Commented Apr 29, 2015 at 17:39
Add a comment  | 

1 Answer 1

Reset to default -1

Try 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

相关推荐

  • Footer doesn&#39;t display in page.php

    So I'm trying to integrate static HTMLCSSJS into WordPress and everything goes really well, but now I realised th

    21小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信