Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Here is my index.php file, for some reason the footer.php isn't being loaded through

really weird, its in the directory of my theme, what could be causing this?

    <?php get_header(); ?>
<?php get_sidebar(); ?>

 <div id="content">

 <?php query_posts('cat=-15'); ?>
 <?php if (have_posts()) : ?>

  <?php while (have_posts()) : the_post(); ?>

    <div class="entry">
     <p><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></p>
     <?php
     if ( has_post_thumbnail() ) { ?>
     <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a>
     <?php } else {
     } ?>     
    </div>

  <?php endwhile; ?>


 <?php else : ?>

  <h2 class="center">Not Found</h2>
  <p class="center">Sorry, but you are looking for something that isn't here.</p>
  <?php get_search_form(); ?>

 <?php endif; ?>

 </div><!--//content-->

<?php get_footer(); ?>
share|improve this question
    
The code snippet above just does not show my full index.php I'm afraid. –  tjcss Nov 30 '10 at 15:56
    
What could cause my footer.php not to pull through? –  tjcss Nov 30 '10 at 15:57
    
REALLY weird. If I delete my footer.php it shows the footer.php from a theme that doesn't even exist! –  tjcss Nov 30 '10 at 16:02
    
We would definitely need more info to help you on this one.. can you pastebin your index.php? –  Jeff Stieler Nov 30 '10 at 16:09
    
Here is my paste bin: pastebin.com/qSaJDMxK and if you look at wackywardrobe.com forward slash dev, thank you.. –  tjcss Nov 30 '10 at 16:33
show 2 more comments

2 Answers

Right, sorry about this but I've figured it out.

My php syntax for echo-ing the date was completely wrong, so I've fixed that using the php documentation and it's all sorted now.

It was: <?php echo "date"(Y); ?>

But should be: <?php echo date("Y"); ?> thanks for all your help, didn't think for one minute that would be the problem, sorry.

share|improve this answer
    
Like I said - there was something wrong with your footer.php! –  anu Dec 2 '10 at 10:14
add comment

From the Codex (http://codex.wordpress.org/Function_Reference/get_footer)

If the theme contains no footer.php file then the footer from the default theme wp-includes/theme-compat/footer.php will be included.

Chances are that something is wrong with your footer.php, and there's nothing to render - ie it's being called, but it's not doing what's expected. .

Can you paste your footer.php?

share|improve this answer
    
Yep sure, here is the pastebin of my footer.php: pastebin.com/4vfC4vgt –  tjcss Dec 2 '10 at 9:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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