Since the page code is quite short I figured it might be helpful to post it here
<?php
get_header();
?>
<?php get_sidebar(); ?>
<!--Start CONTENT -->
<div class="content">
<!--Start Maincontent -->
<div class="maincontent">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="posttitle"><h1 class="page"><?php the_title(); ?></h1></div>
<div class="contentwrap">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<!-- ?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ? -->
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</div>
<?php comments_template(); // Get wp-comments.php template ?>
</div>
<!--End Maincontent -->
<div class="contentfooter"><img src="<?php bloginfo('template_url'); ?>/images/main/footercorner.gif" alt="corner" style="display:block; float:left;"/></div>
<?php get_footer(); ?>
An example for such a page, not displaying proper content is: http://www.helge.at/contact/ (note the correct tab and <title>, yet incorrect main content)
I now tried to use the php-code from SVN (page.php, content-div) – same problem. Blog index instead of page content.. Help!!
As it might have to do with the database here go the rows in question.
Hi rudolf, I have read that post before and cannot find how it applies to the code above.
I just don’t understand how and why the_post() and the_content suddenly print out the loop of blog posts instead of the content of that very page..
Also as in the default 2.1-template it works that very same way I don’t understand why it doesn’t in my case.
Could somebody knowledgeable have a look at my database please? Maybe the problem is there..
Update: I somehow found out that the problem disappears if I remove <?php get_sidebar(); ?> from the template (or move it from above to below the main content).
Why? I still don’t know. At least I know now that page.php and database are both fine.
Will try to find out what’s wrong with the sidebar (and why only for pages).