Support » Themes and Templates » Page.php broken after upgrade to 2.1

  • I have upgraded from 2.0.4 to 2.1.2 recently, now my “Pages” are broken. They show the correct <title>, yet the blog index instead of their content. See my site at

    Following Lorelle’s post I have searched all my theme files and found NO occurrencies of depricated templates, except these ones that don’t seem to make problems:

    list_cats: continues to display nicely. no problems whatsoever visible.
    link_pages: in page.php. I have removed that, what it did wasn’t necessary anyway.
    next_post and previous_post: continue to display nicely. no problems whatsoever visible.

    Nevertheless all my static pages are still broken.

    Ideas anybody?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Since the page code is quite short I figured it might be helpful to post it here

    <?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 &raquo;</p>'); ?>
    				<!-- ?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ? -->
    	  <?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    <?php comments_template(); // Get wp-comments.php template ?>
    <!--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: (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).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page.php broken after upgrade to 2.1’ is closed to new replies.