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)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘move sidebar and post content disappears!’ is closed to new replies.