2011-03-11 5 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 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(); ?> 

을 그리고 목록은 정기적으로 더 정확하게 해당 슬라이더 패널에서 해당 페이지에서 호출됩니다 한 페이지의 콘텐츠, 나는 다음과 같이 게시물 목록을 호출하는 다른 PHP는 루프를 실행합니다. 불행히도, 게시물은 다음 페이지 사이다에서 호출되므로 페이지를 교체해야합니다. 요컨대 : 패널 (1) : 페이지의 콘텐츠 (OK) 패널 2 : 페이지의 콘텐츠 (OK) 패널 3 : 페이지의 콘텐츠 - 2 루프의 포스트 목록 (OK) 패널 (4) : 글 내용 (잘못된) 패널 5 : 게시물 내용 (잘못) ...

패널 4 및 5에서 4 페이지 및 5 페이지 내용이 아닌 게시물이 있어야합니다.

나는이 덕분에 많이

답변

관련 문제