【问题标题】:How to replace the custom post type slug with other post name on url in wordpress?如何在 wordpress 中用 url 上的其他帖子名称替换自定义帖子类型 slug?
【发布时间】:2016-04-11 19:39:48
【问题描述】:

我有一个在下面给出的 url 例如:(工作) www.domain.com/post-type/postname www.domain.com/offer/get-free-20-rs

现在我想替换那个网址 像这样 例如:-(不工作) www.domain.com/brandname/postname www.domain.com/paytm/get-free-20-rs

当我用第二个 url (www.domain.com/paytm/get-free-20-rs) 替换第一个 url (www.domain.com/offer/get-free-20-rs) 然后它转到404错误页面。

基本上将 post_type 替换为其他帖子类型名称。

但我得到了这个网址,但问题是转到 404 错误页面。

那么如何解决这个问题。

谢谢

【问题讨论】:

    标签: mod-rewrite url-rewriting custom-post-type


    【解决方案1】:

    您在此网址上似乎没有页面。它转到 404,因为没有针对此页面的帖子或页面。您必须使用此 www.domain.com/paytm/get-free-20-rs 的帖子上显示的编辑 url 选项编辑此页面 www.domain.com/offer/get-free-20-rs

    【讨论】:

      猜你喜欢
      • 2021-10-01
      • 2017-09-19
      • 2017-02-28
      • 2017-03-30
      • 2017-01-31
      • 1970-01-01
      • 1970-01-01
      • 2016-01-18
      • 1970-01-01
      相关资源
      最近更新 更多