WordPress Page’s are not working.
I am having a bit of trouble with this wordpress website, it was working fine and then all the content dissapeared and it now display post’s on every page instead of that pages wysiwyg content.
I can see this being a simple thing, but i can’t find out why it’s not working, I’ve never had this problem before?
<?php get_header(); ?>
<div id="content">
<div id="greybread"><?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?></div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="singlepage"><?php the_title(); ?></div>
<?php if ( has_post_thumbnail()) : ?>
<div style="float:left; margin:20px 10px 10px 0px; border:1px solid #CCCCCC;">
<?php the_post_thumbnail( array(200,200) ); ?>
</div>
<?php endif; ?>
<div class="entry">
<?php the_content('<p class="serif">Read more »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<?php the_tags(__('Tags: '), ', ', ' '); ?>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Above is my code that I’m using on my page.php site – which is the one that is not working? What’s wrong? as It was working before and I haven’t changed anything on this page for a while!?
Any help of just direction would be appreciated! A LOT!
Do you have any additional page templates aside from page.php? I would make sure that your page is using the template that you’ve intended it to use. For example, if page.php were to be removed, your site might be trying to pull from archives.php.
You could try removing everything else except the loop:
Then you’ll see if the problem is in page.php file or not, but it seems it’s not. If you are saying you have not changed anything in this file. What was the last thing you did before the problem occurred ?
There must be a problem with some plugin.
Check them. may be
dimox_breadcrumbs
plugin is causing the problem.if in case it is causing the problem use
breadcrumb nav xt
plugin.EDIT:
You can check the SQL query by using this code:
look for the whole query in the dump. then check its syntax. put this in your
functions.php
EDIT:
One more thing the header must contain a call to
wp_head();
Try removing your if (have_posts()) and stick just with the while loop.
So
becomes