我的自定义主题页面中有以下代码:
$args = array(
\'public\' => true,
\'_builtin\' => false
);
$output = \'names\'; // names or objects, note names is the default
$operator = \'and\'; // \'and\' or \'or\'
$post_types = get_post_types( $args, $output, $operator );
此代码如果加载在wp管理页面中。问题是,我想加载所有类型的帖子,我尝试更改内置内容,但不起作用。我想获得wordpress的默认帖子和Woocomece产品的自定义帖子类型。有人帮我吗?非常感谢。