2011-02-14 3 views
0

나는 모든 카테고리에서 최신 10 게시물을 표시하려고합니다. 내가 어떻게 해? 현재 추천 카테고리의 게시물을 표시합니다어떻게하면 최신 워드 프레스 10 게시물을 게재합니까

<?php 

      query_posts('category_name=featured&showposts=1'); 
      while(have_posts()):the_post(); 
      $attrs = array(
     'src' => $src, 
     'class' => "", 
     'alt' => get_the_title(), 
     'title' => get_the_title(), 
    );?> 

답변

1

documentation을 읽는 방법에 대해 알려주십시오. 이것은 제안 할 것이다

query_posts('posts_per_page=10'); 

이것은 버전 2.1 이상을위한 것이다; 아래 버전을 사용할 경우

query_posts('showposts=10'); 
관련 문제