0

How can I modify the following to specify a category?

$args = array( 'posts_per_page' => 3 );
$loop = new WP_Query( $args );

I want to specifically specify category to equal 1

4

1 回答 1

0

想通了,只需编辑即可。

$args = array( 'posts_per_page' => 3, cat=>1 );
$loop = new WP_Query( $args );
于 2013-07-03T20:26:46.160 回答