Hierarchical CPT with year slug
For my website, I created a new “conferences” CPT, as posts. The conferences are yearly, so for slugs I use XXXX and have URLs such as example.com/conferences/2024/
This all worked fine, but then my conferences needed subpages for speakers or programme, so I changed my CPT to pages, with “hierarchical” = TRUE. When I create new conferences, my year-slugs get appended with -2.
I realised this is standard WP behaviour, that pages can’t have XXXX year slugs. Now I’m a bit stumped as I need clean year slugs (not /c2024 or similar), but I also need my conferences to have sub-pages.
I can’t think of a solution to this, has anyone done something similar? I have tried plugins such as https://wordpress.org/plugins/allow-numeric-stubs/, but this didn’t help.
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس