我需要像post\\u type“post”中的普通标记一样创建自定义标记存档。
我需要这个http://sitename.com/mtag/test工作方式http://sitename.com/tag/test
add_action( \'init\', \'create_mtags_taxonomy\' );
function create_mtags_taxonomy() {
$labels = array(
\'name\' => \'More Tags\',
\'singular_name\' => \'More Tags\',
\'menu_name\' => \'More Tags\',
);
register_taxonomy(
\'mtags\',
\'post\',
array(
\'label\' => __( \'More Tags\' ),
\'hierarchical\' => false,
\'labels\' => $labels,
\'public\' => true,
\'show_in_nav_menus\' => false,
\'show_tagcloud\' => true,
\'has_archive\' => true,
\'show_admin_column\' => true,
\'rewrite\' => array(
\'slug\' => \'mtag\'
)
)
);
}