我定义了自定义分类:
register_taxonomy(
'my_tax',
'post',
array(
'label' => __('My Tax'),
'rewrite' => array('slug' => 'mytax'),
'hierarchical' => true,
'capabilities' => array(
'name' => _x('My Tax', 'taxonomy general name'),
'singular_name' => _x('My Tax', 'taxonomy singular name'),
'menu_name' => __('My Tax')
)
)
);
永久链接的配置是自定义的,并且看起来像/%my_tax%/%postname%/
。一切都适用于帖子,如:
example.com/my_defined_tax1/post_no_1
example.com/my_defined_tax1/post_no_2
example.com/my_defined_tax2/post_no_3
但如果我有页面:
example.com/sample_page/
我收到404错误。我必须做些什么来解决这个问题?