How can I add date to Custom Rewrite Slug?
-
I have created a CPT with the slug of “news”. I would like the URLs to look like this:
domain.com/news/2020/10/14/specific-post-slug
In the Custom Rewrite Slug field, I tried:
/news/%year%/%monthnum%/%day%/
(Like you might set on the Permalinks settings page.) But that doesn’t work. It results in URLs like this:
domain.com/news/%year%/%monthnum%/%day%/specific-post-slug
Can anyone explain how to achieve this? Or point me at a tutorial or documentation?
What is the correct way to accomplish this? I’ve tried searching for an answer with no luck. If you can’t give an explanation here, links to a tutorial would be appreciated!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How can I add date to Custom Rewrite Slug?’ is closed to new replies.