2
나는 내 코드에서 첫 번째 쿼리에 표시된 게시물을 제거하고 위의 3 개의 최근 게시물을 표시하는 방법을 원합니다.WordPress 최근 게시물에서 게시물을 제거
최고 게시물 :
<?php query_posts('posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post();?>
<h2><?php the_title(); ?></h2>
<div class="news-feat-img">
<a href="<?php the_permalink(); ?>" ><?php the_post_thumbnail('indexsavedimage'); ?></a>
</div>
<?php the_excerpt(); ?>
<?php endwhile; endif; wp_reset_query();?>
최근 포스트 :
</a><div class="clearboth"></div>
<div class="borderline"></div>
<?php query_posts('posts_per_page=3'); if (have_posts()) : while (have_posts()) : the_post();?>
<!-- Older news articles -->
<div class="news-posts">
<div class="news-thumb-wrap">
<div class="news-thumb">
<a href="<?php the_permalink(); ?>" ><?php the_post_thumbnail('newsimages'); ?></a>
</div>
</div>
<!-- Truncate long titles to stop the layout from messing up! -->
<a class="title" href="<?php the_permalink(); ?>">
<strong><?php the_title(); ?></strong>
</a>
<div class="clearboth"></div>
<?php the_excerpt(); ?>
<div class="news-action">
<span class="label"><?php the_category(', '); ?></span>
<a href="<?php the_permalink(); ?>" ><span class="label"><i class="icon-share icon-white"></i> </span></a>
</div>
</div>
<?php endwhile; endif; wp_reset_query();?>
그래서 첫 번째 최고 게시물 (3)을 가져 와서 첫 번째 특정 스타일을 다른 스타일로 다시 표시하고 싶습니까? 죄송합니다, 잘못 읽었습니다. – phatskat
@phatskat 매우 큰 윗부분이 보이며 하단에도 표시됩니까? 그 게시물을 하단에서 제거하고 그 게시물 다음에 최근 게시물 3 개를 대신 표시하고 싶습니다. –