是否可以对链接应用自定义分类法?如果是,怎么做?
我已经这样做了,但似乎不起作用:
$labels = array(
\'name\' => _x( \'Lessons\', \'Taxonomy General Name\', \'text_domain\' ),
\'singular_name\' => _x( \'Lesson\', \'Taxonomy Singular Name\', \'text_domain\' ),
\'menu_name\' => __( \'Lesson\', \'text_domain\' ),
\'all_items\' => __( \'All Lesson Lessons\', \'text_domain\' ),
\'parent_item\' => __( \'\', \'text_domain\' ),
\'parent_item_colon\' => __( \'\', \'text_domain\' ),
\'new_item_name\' => __( \'New Lesson\', \'text_domain\' ),
\'add_new_item\' => __( \'Add new Lesson\', \'text_domain\' ),
\'edit_item\' => __( \'Edit Lesson\', \'text_domain\' ),
\'update_item\' => __( \'Update Lesson\', \'text_domain\' ),
\'separate_items_with_commas\' => __( \'Separate Lessons with commas\', \'text_domain\' ),
\'search_items\' => __( \'Search Lessons\', \'text_domain\' ),
\'add_or_remove_items\' => __( \'Add or remove Lessons\', \'text_domain\' ),
\'choose_from_most_used\' => __( \'Choose from the most used Lessons\', \'text_domain\' ),
\'not_found\' => __( \'Not Found\', \'text_domain\' ),
);
$args = array(
\'labels\' => $labels,
\'hierarchical\' => true,
\'public\' => true,
\'show_ui\' => true,
\'show_admin_column\' => true,
\'has_archive\' => true,
\'show_in_nav_menus\' => true,
\'show_tagcloud\' => true,
);
register_taxonomy( \'lesson\', array( \'post\',\'portfolio\',\'link\', \'forum\' ), $args );
谢谢
马可