2011-03-11 60 views
0

我想揭露一个关于在Wordpress中两个循环集成的问题。 我有这个滑块(来自WP科达滑块插件),它调用网页:WordPress的两个循环嵌套

<?php query_posts('post_type=page&orderby=title&order=asc'); ?> 
<div class="scrollContainer"> 
<?php while (have_posts()) : the_post(); ?> 
<div class="panel" id="<?php echo $post->post_name ; ?>"> 
<?php the_content(); ?> 
</div> 
<?php endwhile;?> 
</div> 

和它的伟大工程。 在一个页面上的内容,我再跑PHP循环调用帖子列表的,就像这样:

<?php query_posts ('post_type=post&order=desc'); ?> 
<?php while (have_posts()) : the_post(); ?> 
<li><a rel="group_news" href="<?php the_permalink() ; ?>"><?php the_title(); ?></a><?php echo '&nbsp;&nbsp;&nbsp;' ?><?php comments_number('No Comments','1 Comment','% Comments'); ?></li><?php endwhile;?> 
<?php wp_reset_query(); ?> 

,并将列表在页面经常叫,在滑盖面板更精确。 不幸的是,帖子也被称为sider的下一个面板,因为页面必须替换它们。 简而言之: 面板1:页面内容(OK) 面板2:页面内容(OK) 面板3:页面内容 - 第二环的职位列表(OK) 面板4:交内容(错误的) 面板5:发布内容(错误) ...

在面板4和5中,我希望有第4页和第5页的内容,而不是帖子!

我解决不了这个 非常感谢

回答