2013-12-14 1 views
0

내 게시물에 더 많은 요소를 추가했으며 클릭하면 내 페이지에 더 많은 내용이 표시되지만 클릭하면 나머지 게시물이 표시되지 않습니다.Wordpress는 게시물의 나머지 부분을 더 이상 표시하지 않습니다.

<?php 
    global $more; 
    $more = 0; 
?> 

<div id="content"> 

<?php 
    query_posts('cat=5'); 
    while (have_posts()) : the_post(); 
    $thumb_id = get_post_thumbnail_id(); 

    $thumb_url = wp_get_attachment_image_src($thumb_id,'full', true); 
    echo '<div class="myContent"> 
    <img class="image" src="'.$thumb_url[0].'" >'; 

    the_content('<div class="read">READ MORE</div>'); 
    echo'</div>'; 
    endwhile; 
?> 
</div> 

답변

1

링크 포인팅이 없으므로. 다음과 같아야합니다.

<?php 
    global $more; 
    $more = 0; 
?> 

<div id="content"> 

<?php 
    query_posts('cat=5'); 
    while (have_posts()) : the_post(); 
    $thumb_id = get_post_thumbnail_id(); 

    $thumb_url = wp_get_attachment_image_src($thumb_id,'full', true); 
    echo '<div class="myContent"> 
    <img class="image" src="'.$thumb_url[0].'" >'; 

    the_content('<div class="read"><a href="<?php the_permalink ?>">READ MORE</a></div>'); 
    echo'</div>'; 
    endwhile; 
?> 
</div> 
+0

이 경우 URL이 변경되지는 않지만 나머지 게시물은 표시되지 않습니다. – Reyko

+0

커스텀 테마를 사용하고 있는지, 어쩌면 예제를 제공하고 있는지, 그리고 이것이 single.php 페이지 인 것 같다고 말씀해 주시겠습니까? – Benjamin

+0

예 테마를 개발 중입니다.이 템플릿은 사용자 정의 템플릿 페이지입니다. single.php가 아닙니다. – Reyko

관련 문제