我正在尝试检索当前用户创建的所有自定义帖子类型。
我有一段代码:
wp_get_current_user();
$args_my_items = array(
\'posts_per_page\' => 10,
\'post_type\' => \'mycustomposttype\',
\'post_author\' => $current_user->ID);
query_posts($args_my_items);
最终返回的是所有类型为“mycustomposttype”的帖子。它不按post\\u作者过滤。
我是否使用了错误的查询参数?如何按当前用户筛选?
谢谢