Support » Fixing WordPress » move sidebar and post content disappears!

  • ARGH!!
    Here’s the template for a page:

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<h2><?php the_title(); ?></h2>
    	<?php the_content(); ?>
    		<?php endwhile; endif; ?>
    	</div>
    <?php get_footer(); ?>

    Pretty basic. But the “content” div only populates if the sidebar call comes AFTER that div, just before the footer call.
    The css validates, as does the html for both page versions (call sidebar before content and call after content). But the code pasted above the div “content” is empty.

    I can fudge the css for placement but would rather understand why this is happening so I can avoid in the future.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you ever solve this problem? I’m having the same difficulty on a site right now, and this is the only specific reference I can find.

    Jo

    Most likely, you both have a Loop in the sidebar that overwrites the original Loop in the template file…

    I don’t have any loops at all in the sidebar at present. I’m converting an XHTML site to WordPress.

    viabledesign,

    Can you provide a link to the site where this is happening?

    Thanks, Wild, but I already fixed mi problemo. It turned out to be a matter of column widths squeezing each other out. :/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘move sidebar and post content disappears!’ is closed to new replies.