Wordpress WP–内容代码防止子页面出现在侧边栏中

Wordpress WP–内容代码防止子页面出现在侧边栏中,wordpress,templates,Wordpress,Templates,在我的一个wordpress模板中,内容代码似乎阻止子页面菜单显示在侧边栏中。当我从contentdiv中删除所有代码时,子页面菜单将按预期显示 有人能指出代码哪里出错了吗 任何帮助都将不胜感激 <div id="content"> <div class="pageinfo clearfix"> <div class="info"> <h1><?php the_title();?></h1>

在我的一个wordpress模板中,内容代码似乎阻止子页面菜单显示在侧边栏中。当我从contentdiv中删除所有代码时,子页面菜单将按预期显示

有人能指出代码哪里出错了吗

任何帮助都将不胜感激

<div id="content">

        <div class="pageinfo clearfix">
    <div class="info">
    <h1><?php the_title();?></h1>
    </div>
</div>

        <?php
            global $more;
            // set $more to 0 in order to only get the first part of the post
            $more = 0; 
            global $post;
            $myposts = query_posts("category_name=intern&posts_per_page=3");
            foreach($myposts as $post) :
            setup_postdata($post);
        ?>
        <div class="postitem clearfix">
            <div class="new"></div>
            <div class="info">
                <h2><a href="<?php the_permalink()?>"><?php the_title()?></a></h2>
                <?php the_date()?> | Skrevet af <?php the_author_posts_link(); ?> | Gemt under:
                <?php
                // heres just the name and permalink:
                foreach((get_the_category()) as $category) { 
                    $category_name = $category->category_nicename . ' '; 
                    $category_link = get_category_link($category->cat_ID);
                    echo "<a href='$category_link'>$category_name</a>";
                } 
                ?>
            </div>
                <?php
                $thumb = get_post_meta($post->ID,'_thumbnail_id',false);
                $thumb = wp_get_attachment_image_src($thumb[0], false);
                $thumb = $thumb[0];?>

                <?php if($thumb != NULL) { ?>
                    <a href="<?php the_permalink() ?>">
                    <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $thumb ?>&h=110&w=110&zc=1" alt="<?php the_title(); ?>" width="110" height="110" class="leftImage" >
                    </a>
                <?php } ?>

                <?php the_content('<br />Læs resten her » '); ?>
                <div class="clearBoth"></div>



        </div><!-- /postitem -->
        <?php endforeach; ?>


    </div><!-- /content -->
试着倒带帖子;或wp_reset_查询;在加载侧边栏之前和endforeach之后的某个地方