你能否告诉我在那里做错了什么:
$popular_posts_args = new wp_query( array(
'post_type' => 'blog',
'post_status' => 'publish',
'orderby' => 'meta_value_num',
//'meta_value' => '1',
'order' => 'DESC',
'meta_key' => 'my_post_viewed',
'posts_per_page' => $number
)
);
query_posts( $popular_posts_loop );
while( $popular_posts_loop->have_posts() ):
$popular_posts_loop->the_post();
wp_reset_query();
这一行:
query_posts( $popular_posts_loop );
while( $popular_posts_loop->have_posts() ):
$popular_posts_loop->the_post();
答案 0 :(得分:0)
$ popular_posts_loop
而不是$ popular_posts_args
现在很好!