我想通过特定的作者id(当前用户)获取所有帖子。稍后,我想选择该用户(ASC)发表的第一篇帖子。我想我在get\\u帖子中没有使用正确的参数,是吗$current\\u user\\u posts始终包含一个数组,其中所有博客帖子位于多个不同的WP\\u Post对象中。
global $current_user;
get_currentuserinfo();
$args = array(
\'author\' => $current_user->ID, // I could also use $user_ID, right?
\'orderby\' => \'post_date\',
\'order\' => \'ASC\'
);
// get his posts \'ASC\'
$current_user_posts = get_posts( $args );