사이트 예제
// The Query
query_posts( $args );
// The Loop
while ( have_posts() ) : the_post();
echo '
<li>';
the_title();
echo '</li>
';
endwhile;
// Reset Query
wp_reset_query();
-------------------------------------------------------------------------
활용
query_posts('cat=2');
-> cat은 category
2는 카테고리의 ID값
아이디어 제공 :
참고 사이트 :
https://developer.wordpress.org/reference/functions/query_posts/
'솔루션 > 워드프레스' 카테고리의 다른 글
워드프레스 TinyMCE Advanced 활성화 했는데 안 보일 때 (0) | 2017.04.06 |
---|