删除WordPress网址中的类别(Remove category in WordPress url)

编程入门 行业动态 更新时间:2024-10-26 09:27:47
删除WordPress网址中的类别(Remove category in WordPress url)

我有一个WordPress博客,其中包含有类别的帖子,这可能是我的网址示例:

www.example.it

我的帖子的网址现在是:

www.example.it/sample-post

我的类别列表的网址现在是:

www.example.it/category/my-category

我想我的网址是这样的:

wwww.example.it/sample-post (for posts) www.example.it/my-category (for categories)

谷歌搜索后我创建了这个我试过的解决方案:

Go to Setting > Permalinks Select Custom Structure Add /%category%/%postname%/ after your domain Change Category Base to period/dot.

通过这种方式,类别URL是正确的:

www.example.it/my-category

但是帖子网址不是:

www.example/my-category/sample-post

为了得到我想要的网址,我可以改变什么?

I have a WordPress blog with posts that has categories, this could be an example of my url:

www.example.it

The url for my post is now:

www.example.it/sample-post

The url for my category list of posts is now:

www.example.it/category/my-category

I would like my urls like this:

wwww.example.it/sample-post (for posts) www.example.it/my-category (for categories)

After googled I founded this solution that I tried:

Go to Setting > Permalinks Select Custom Structure Add /%category%/%postname%/ after your domain Change Category Base to period/dot.

In this way the category url is correct:

www.example.it/my-category

but post url is not:

www.example/my-category/sample-post

What could I change for get the url like I want?

最满意答案

恢复永久链接,选择“帖子名称”,然后安装此插件。 无需配置,它将替换类别模板的URL中的“类别”一词。

https://wordpress.org/plugins/no-category-parents/

Restore the permalink selecting "Post name" and then install this plugin. No configuration needed, it replaces the word "category" in the url of category template.

https://wordpress.org/plugins/no-category-parents/

更多推荐

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

发布评论

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

>www.elefans.com

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