简体   繁体   English

更改wordpress自定义帖子类型的永久链接

[英]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.

相关问题 无法显示custom-post-type -wordpress帖子的详细信息 - cant show details of a post of custom-post-type -wordpress Wordpress自定义帖子类型和永久链接 - Wordpress Custom post type and permalink 如何制作Wordpress自定义帖子类型固定链接 - How to make Wordpress Custom Post Type Permalink WordPress 自定义帖子类型的永久链接结构 - WordPress Permalink Structure for Custom Post Type 如何在 Wordpress 中按类别过滤 archive-{custom-post-type}.php? - How to filter archive-{custom-post-type}.php by category in Wordpress? WordPress 自定义帖子类型固定链接,在 URL 中带有父帖子标题 - Wordpress Custom Post Type Permalink with Parent Post Title in URL 如何在WordPress中实现URL结构,例如“网站名称/存档页面/类别(或自定义分类法/自定义帖子类型)”? - How to achieve URL structure like “website-name/archive-page/category(or custom taxonomy)/custom-post-type” in WordPress? Wordpress - 自定义帖子类型和自定义永久链接结构错误 - Wordpress - Custom Post Type and Custom Permalink Structures Error 如何获取在Wordpress中按类别过滤的自定义帖子类型的永久链接? - How to get permalink of custom post type that filter by category in Wordpress? WordPress:用于自定义帖子类型类别存档的永久链接重写 - WordPress: permalink rewrite for custom post type category archive
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM