Permalink structure in Back-end: http://domain.com/%year%/%category%/%postname%
For “regular” Posts/Pages all is okay but as soon a CPT is shown %year%
is gone?
Url shown for Posts/Pages looks some like: http://domain.com/2014/category01/regular-post001
Url shown for CPT looks some like: http://domain.com/category01/cpt-post002
Most weird (to me) is, when I give in (for that CPT) http://domain.com/2014/category01/cpt-post002
it shows the CPT BUT then leaves out/redirects to the url without 2014(year).
What am I missing/doing wrong?
The permalink configuration in WordPress backend is only for standard posts and pages. For CPT the default URL structure is
http://example.com/cpt-identifier/post-slug
. If you want a different URL structure for you CPT you will have to define and register your own rewrite rules.For example:
If you want to include dinamic tag in the URL structure of your CPT, like year, you will have to define your own rewrite rules and permalink filter: