내 Wordpress 테마에 문제가 있습니다. 내 next_posts_link()
은 같은 페이지 만 다시로드합니다. 여기 내 코드가있다.Wordpress next_posts_link()는 동일한 페이지 만 다시로드합니다.
<div id="main">
<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="utdrag">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="crop"><a href="<?php the_permalink(); ?>">
<?php
if (get_the_post_thumbnail($post_id) != '') {
echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">';
the_post_thumbnail();
echo '</a>';
} else {
echo '<img src="';
echo catch_that_image();
echo '" alt="Image unavailable" class="crop" />';
echo '</a>';
}
?></a>
</div>
<?php the_excerpt(); ?>
</div>
<?php endwhile; else: endif; ?>
<?php next_posts_link();?><?php previous_posts_link();?>
</div>
정적 페이지를 제 1면 페이지로 사용하고 있습니다. 보시다시피 페이지 제목과 동일한 카테고리의 게시물 만 표시됩니다. query_posts('category_name='.get_the_title().'&post_status=publish,future');
이것은 유지하고 싶은 내용입니다. 왜 사람들이 그것을 다시로드하는지 알 수 있습니까? 왜 다음 페이지로 변경되지 않는거야?
글쎄, 그건 허풍이야. 주위에 방법이 있는지 아시나요? 기사는 방금 내가 한 것을 요약했습니다. –
@ HåvardBrynjulfsen : 다음과 같이해볼 수 있습니다 :' php global $ paged; query_posts ('paged ='. $ paged); ?>'하지만 제대로 작동하는지 확신 할 수 없습니다. –
어디 코드에 넣어야합니까? –