我用以下代码为wordpress页面注册了类别:
function add_cat_2_page() {
register_taxonomy_for_object_type('category','page');
}
// Add to the admin_init hook of your theme functions.php file
add_action( 'init','add_cat_2_page' );
在永久链接中,我像这样设置了自定义结构:
/%category%/%postname%/
不幸的是,它只显示具有已定义结构的页面,而不是我的页面!
我需要相反:我只希望页面具有这种结构,而不是帖子!