I need some help to find the solution to remove the url date only from posts in a specific category.
I have my permalinks settings like this:
/%year%/%monthnum%/%day%/%category%/%postname%/
A category-x post has the following url:
http://mysite/2021/08/25/category-x/post-name/
I need only for category-x posts, the url looks like this:
http://mysite/category-x/post-name/
The other posts would remain with the date in the url.
I tried to do something with the rewrite_rules_array and post_link filters, with no success.
How could I solve it?
2
Answers
I solved it this way:
Thank you anyway!
Changing category base prefix
Try Redirects After Changing Category Base Prefix