求助大神:wpjam自定义文章类型permastruct
wpjam_register_post_type('team',[
'public' => true,
'label' => '团队',
'menu_position' => 4,
'menu_icon' => 'dashicons-groups',
'supports' => ['title','editor'],
'has_archive' => true,
'rewrite' => ['slug' => 'team', 'with_front' => false],
'permastruct'=> '/team/%post_id%.html'
]);
如上:'permastruct'=> '/team/%post_id%.html' 的情况下,固定链接可以实现 http://www.xxoo.com/team/56.html ; 如果 %post_id% 换成 %postname% 固定链接只能 http://www.xxoo.com/team/postname 没有后缀.html,尝试各种方式无果,求助大神。
1条回复
我要回复
暂时不支持网页回复,请安装