[英]To display category,sub-category,sub-sub categories and postname in url permalink in wordpress php
If a post has three categories.parent category,sub category and sub-sub category.when i click on the post i want the url like 如果帖子具有三个类别。父类别,子类别和子子类别。当我单击帖子时,我想要的网址是
category/subcategory/sub-subcategory/postname/
类别/子/子子类别/ postname /
I updated my custom permalink structure as 我将自定义永久链接结构更新为
/%category%/%postname%/
/%类别%/%postname%/
But im not getting the required permalink.I searched a lot and i got some functions.I used that rewrite rules function.nw the post url is coming correctly.bt it redirects to 404 page.Please help me: 但是我没有得到所需的永久链接。我进行了很多搜索并找到了一些函数。我使用了重写规则函数.nw的发布网址正确到达.bt它将重定向到404页面。请帮助我:
Goto Settings->Permalink Settings-> Custom Structure 转到设置->永久链接设置->自定义结构
Add this as custom structure. 将其添加为自定义结构。 http://127.0.0.1/wordpress/%category%/%postname%/ Hope this will work for you.
http://127.0.0.1/wordpress/%category%/%postname%/希望这对您有用 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.