Php 致命错误:对成员函数的调用将_posts()设置为null

Php 致命错误:对成员函数的调用将_posts()设置为null,php,wordpress,Php,Wordpress,你能告诉我我做错了什么吗 $popular_posts_args = new wp_query( array( 'post_type' => 'blog', 'post_status' => 'publish', 'orderby' => '

你能告诉我我做错了什么吗

$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();

抱歉,伙计们,我刚意识到我

$popular_posts_loop

而不是$popular\u posts\u args


现在好了

首先,这不是编写循环的方法……对不起,我更像是个新手