如果我完全理解这个问题,那么您可以在注册CPT时设置对页面属性的支持,如下所示:
add_action( \'init\', \'register_products_post_type\' );
function register_products_post_type() {
$labels = array(
\'name\' => \'Products\'
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'rewrite\' => array(
\'with_front\' => false
),
\'has_archive\' => true,
\'hierarchical\' => true,
\'menu_position\' => 5,
\'supports\' => array( ..., \'page-attributes\', ... )
);
register_post_type( \'products\', $args );
}
“管理帖子”页面中将显示一个列表框。