Products
GG网络技术分享 2025-03-18 16:12 10
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 > PermalinksSelect 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?
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.
###
You don\'t need PHP to do this, just go to Settings->Permalinks and select \\\"Post name\\\".
If you want to make some custom link structure, please take a look at Wordpress Codex
###
Remove %category%
from your permalink structure and install Remove Category URL plugin.
Demand feedback