admin管理员组文章数量:1122832
I have a travel blog with multiple categories and subcategories and I'm trying to find/create some code to include on my functions.php file so the permalink only contains the last nested subcategory instead of all the parents. Not looking for a plugin to make this to avoid relying on the developer to keep it updated.
Basically I would like to replace this mysite/europe/italy/rome/
with this mysite/rome/
I found this 13 years old question with a response that contains exactly what I need but I tested it and it's not working on my site. Since the response is pretty old, I'm not sure if that code doesn't work anymore or if it is correct and something else has to be changed on my end.
Thanks in advance for anyone who can help me figure this out.
本文标签: categoriesDisplay last category child in permalink
版权声明:本文标题:categories - Display last category child in permalink 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307314a1933267.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论