2013-08-29 2 views
0

안녕하세요 저는 워드 프레스 블로그를 가지고 있습니다.이 코드를 사이드 바의 single.php 페이지 내에 넣으십시오 코드는 사이드 바에있는 동일한 코드입니다> this 코드가 hompage 사이드 바에서 올바르게 작동하고 모든 게시물 로 돌아가지만 single.php 사이드 바에서 하나의 게시물로만 돌아갑니다.내 single.php 내의 루프 WordPress 블로그는 하나의 게시물에 대해서만 반환합니다

<?php if (have_posts()) : ?> 
<?php while (have_posts()) : the_post(); ?> 

<div class="new-posts-form"> 
<div class="new-posts-img"><a href="<?php the_permalink(); ?>"></a><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(100,80)); ?></a></div> 
<div class="new-posts-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div> 
<div class="new-post-description"><?php content('11'); ?></div> 
<div class="new-post-add-date-time"><img src="<?php bloginfo('template_url'); ?>/images/tb_clock.png" /><?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> : <?php the_category(', ') ?></div> 


<?php endwhile; ?> 
<?php endif; ?> 
+1

single.php' 당신에게 왜 단서를 제공해야'에서'single' ... :) – sprain

답변

1

나는 내가 당신의 문제가이 도움말을 희망 해결하기 위해 노력하고 http://codex.wordpress.org/Function_Reference/get_post

당신이 확인하세요 참조 할 수 있도록이

를 사용해야합니다 single.php 페이지에서 생각합니다.

감사 아난드

관련 문제