删除类别和来自WordPress网址的标记库

编程入门 行业动态 更新时间:2024-10-28 04:17:47
本文介绍了删除类别和来自WordPress网址的标记库-没有插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我要删除类别& WordPress URL中的标记库.我遇到了其他使用插件的帖子和解决方案.我想远离插件,并从functions.php内部获得解决方案.这样可以防止将来更改任何插件更新或WordPress默认文件.

I would like to remove the category & tag base from WordPress URL. I have come across other posts and solutions which used plugins. I would like to stay away from plugins and have a solution from within functions.php. This would prevent any future plugin updates or WordPress default files from being changed.

任何帮助将不胜感激.谢谢!

Any help would be appreciated. Thanks!

到目前为止,我已经尝试了以下解决方案:

I have tried these solutions so far:

  • 此htaccess解决方案无效: mikepayne.co/2011/remove-category-base-from-url/
  • 这些方法也失败了: www.askapache/wordpress/remove-category-wordpress-urls.html
  • This htaccess solution did not work: mikepayne.co/2011/remove-category-base-from-url/
  • These methods also failed: www.askapache/wordpress/remove-category-wordpress-urls.html
推荐答案

如果要从网址中删除/category/,请执行以下两个步骤:

If you want to remove /category/ from the url, follow these two steps:

  • 转到设置" >>永久链接",然后选择自定义",然后输入:/%category%/%postname%/
  • 接下来将您的类别库"设置为.
  • Go to Settings >> Permalinks and select Custom and enter: /%category%/%postname%/
  • Next set your Category Base to .
  • 保存它,您将看到URL更改为以下格式: yourblog/quotes/

    Save it and you’ll see your URL changed to this format: yourblog/quotes/

    (来源: premium.wpmudev/blog/daily-tip-quick-trick-to-remove-category-from-wordpress-url/)

    更多推荐

    删除类别和来自WordPress网址的标记库

    本文发布于:2023-11-01 07:26:55,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1548661.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:标记   类别   网址   WordPress

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!