0

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? enter image description here

  • 1
    Enable Debug mode by using define('WP_DEBUG',true); in wp-config.php and post any errors that you encountered. – Manoj Kumar Apr 29 '15 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 Apr 29 '15 at 16:36
  • I have edited the main thread (EDIT 2). – Deimantas Brandišauskas Apr 29 '15 at 17:17
  • Why it's happening? Can you elaborate what's happening since footer is displayed there. – Manoj Kumar Apr 29 '15 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 Apr 29 '15 at 17:39
-1

Try to use include("footer.php");

And I see your

<div id="content" class="snap-content">

didn't have close tag </div>

  • It actually has its closing tag, since <div class="header-clear"></div> is in the same line, so 3 closes. The reason to this was that I DIDN'T needed that last </div> tag, which closes the <div id="content" class="snap-content"> because it's being closed inside footer.php file. Thank you for your answers. You gave me an idea where my problem could be :) – Deimantas Brandišauskas Apr 29 '15 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.