【问题标题】:Change custom post type url/slug in wordpress?在 wordpress 中更改自定义帖子类型 url/slug?
【发布时间】:2017-03-30 11:50:13
【问题描述】:

我想将我的自定义帖子 url/slug 从“property”更改为“project”。

从此https://ayanaproperties.com/property/chelsea-creek-development-sw6-london/ 给这个https://ayanaproperties.com/project/chelsea-creek-development-sw6-london/

使用什么方法/插件或任何功能?

【问题讨论】:

    标签: wordpress url-rewriting


    【解决方案1】:

    您应该在主题中搜索register_post_type 函数。 当你找到它时,确保它注册了你的帖子类型,然后搜索rewrite param。如果不存在,则添加如下示例:

    'rewrite' => array(
        'slug' => 'developer',
    ),
    

    然后确保您已更新永久链接结构。

    【讨论】:

      猜你喜欢
      • 2017-02-28
      • 2017-01-31
      • 2016-09-04
      • 1970-01-01
      • 2021-01-29
      • 2019-09-06
      • 2015-08-12
      • 2013-01-19
      • 2021-10-01
      相关资源
      最近更新 更多