Php 删除分层自定义post类型的永久链接中的基本slug
我有一个名为Php 删除分层自定义post类型的永久链接中的基本slug,php,wordpress,.htaccess,custom-post-type,permalinks,Php,Wordpress,.htaccess,Custom Post Type,Permalinks,我有一个名为project的分级自定义帖子类型,注册如下: register_post_type( 'project', array( 'public' => true, 'hierarchical' => true, 'rewrite' => array( 'with_front' => false ) ) ); 当前的URL如下所示
project
的分级自定义帖子类型,注册如下:
register_post_type( 'project',
array(
'public' => true,
'hierarchical' => true,
'rewrite' => array(
'with_front' => false
)
)
);
当前的URL如下所示:
页面
s、博客帖子
s、其他自定义帖子类型)
当前存在的所有解决方案都可能导致站点上其他页面出现404,或者无法正确使用嵌套URL。添加自定义帖子类型时,请不要忘记重新保存永久链接,或者尝试其他解决方案。@RST感谢您的提示,我一直在这样做。添加自定义帖子类型或尝试其他解决方案时,不要忘记重新保存永久链接。@RST谢谢你的提示,我一直在这样做。