[英]Changing wordpress custom-post-type permalink
How can I personalize a custom post URL in Wordpress? 如何在Wordpress中个性化自定义帖子URL? I've been using Custom Post Type Plugins but I want to change this URL:
我一直在使用自定义帖子类型插件,但我想更改此URL:
website.com/slug/%models_cat%-%models_tag%/%postname%
To: 至:
website.com/slug/%models_cat%-%models_tag%-%postname%
The second link gives me a 404 error if I change /
to -
on %postname%
. 如果我改变的第二个链接给了我一个404错误
/
到-
在%postname%
I tried to search, but couldn't find anything relevant. 我尝试搜索,但找不到任何相关内容。
Have you tried changing it in Settings-Permalinks? 您是否尝试过在“设置永久链接”中进行更改?
You should be able to select Custom Structure and add any of these variables. 您应该能够选择“自定义结构”并添加任何这些变量。
https://codex.wordpress.org/Using_Permalinks https://codex.wordpress.org/Using_Permalinks
EDIT: 编辑:
This issue has been addressed in Wordpress Stack Exchange. 此问题已在Wordpress Stack Exchange中解决。
You have to edit the function.php file. 您必须编辑function.php文件。
https://wordpress.stackexchange.com/questions/212379/dashes-instead-of-slashes-as-permalink-structure-separator https://wordpress.stackexchange.com/questions/212379/dashes-instead-of-slashes-as-permalink-structure-separator
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.