进一步解释你的问题。如果要获取数据库中的所有帖子,请使用以下代码
$query = array(
\'post_type\' => \'my-post-type\',
\'post_author\' => $current_user->ID,
\'post_status\' => array(\'publish\', \'pending\', \'draft\', \'auto-draft\',
\'future\', \'private\', \'inherit\', \'trash\') );
$loop = new WP_Query($query);
while ( $loop->have_posts() ) : $loop->the_post();