duanseci1039 2013-06-30 11:53
浏览 53
已采纳

WP_Query的查询方法的WordPress数组参数:键名列表

Inisde wp-includes/query.php we have the following code:

class WP_Query {

//...

        function query( $query ) {
                $this->init();
                $this->query = $this->query_vars = wp_parse_args( $query );
                return $this->get_posts();
        }

//...

}

Where can I find a list of names which can be passed as keys to the $query hash together with some text describing what such parameters actually do? For example by following a tutorial example I was able to find out the $query parameter array supports values 's' for the serch keys and 'showposts' for maximum number of posts. Where can I find a list of all the other key names and what they do?

Thanks.

  • 写回答

2条回答 默认 最新

  • dongyingming8970 2013-06-30 11:57
    关注

    Right over here. Check out the official page on their Codex.

    http://codex.wordpress.org/Class_Reference/WP_Query

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?