我正在尝试创建一个自定义的帖子类型(通过插件)。帖子类型必须非常类似于页面,所以我想从其他插件加载元框,并在我的自定义帖子类型中加载主题。
我注册的帖子类型如下:
register_post_type(\'product\', array(
"labels" => $labels,
"description" => "Product",
"menu_icon" => \'dashicons-media-text\',
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'menu_position\' => 20,
\'show_in_menu\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'page\',
\'exclude_from_search\' => false,
\'supports\' => array( \'title\', \'editor\', \'author\', \'thumbnail\',\'revisions\' )
));
加载metadbox插件的方式如下:
add_meta_box("page-meta", "settings", "pageMeta", "page", "normal", "low");
是否有方法继承页面元数据库?