如何在WP中添加页面类别?

时间:2017-12-28 07:17:47

标签: wordpress wordpress-theming custom-wordpress-pages

有没有办法为每个页面添加类别。我问它,因为我只看到帖子的类别选项。

2 个答案:

答案 0 :(得分:1)

您可以在主题文件夹中的functions.php中添加以下代码:

function myplugin_settings() {  
    // Add tag metabox to page
    register_taxonomy_for_object_type('post_tag', 'page'); 
    // Add category metabox to page
    register_taxonomy_for_object_type('category', 'page');  
}
 // Add to the admin_init hook of your theme functions.php file 
add_action( 'init', 'myplugin_settings' );

答案 1 :(得分:0)

我认为插件Add Category to Pages可以帮助您添加包含网页的类别。

相关问题