admin管理员组文章数量:1130349
I'm trying to create custom post types but i need the posts of custom post type to have the url along with parent category. Example for now i have custom post types science, tech, business. The url of each post is mysite/science/postname. what i need is mysite/articles/science/post name. I tried giving articles/science in rewrite rule of cpt ui but it gives 404 error. Can you guys point me to right direction? Thank you
I'm trying to create custom post types but i need the posts of custom post type to have the url along with parent category. Example for now i have custom post types science, tech, business. The url of each post is mysite/science/postname. what i need is mysite/articles/science/post name. I tried giving articles/science in rewrite rule of cpt ui but it gives 404 error. Can you guys point me to right direction? Thank you
Share Improve this question edited Oct 17, 2018 at 18:15 MJN asked Oct 17, 2018 at 18:02 MJNMJN 1132 bronze badges1 Answer
Reset to default 0hierarchical must be set to true and make sure you have the Article post type set as the parent of the science post type
....and be sure to flush the permalinks after making changes
I'm trying to create custom post types but i need the posts of custom post type to have the url along with parent category. Example for now i have custom post types science, tech, business. The url of each post is mysite/science/postname. what i need is mysite/articles/science/post name. I tried giving articles/science in rewrite rule of cpt ui but it gives 404 error. Can you guys point me to right direction? Thank you
I'm trying to create custom post types but i need the posts of custom post type to have the url along with parent category. Example for now i have custom post types science, tech, business. The url of each post is mysite/science/postname. what i need is mysite/articles/science/post name. I tried giving articles/science in rewrite rule of cpt ui but it gives 404 error. Can you guys point me to right direction? Thank you
Share Improve this question edited Oct 17, 2018 at 18:15 MJN asked Oct 17, 2018 at 18:02 MJNMJN 1132 bronze badges1 Answer
Reset to default 0hierarchical must be set to true and make sure you have the Article post type set as the parent of the science post type
....and be sure to flush the permalinks after making changes
本文标签: permalinksHow to add rewrite rule to custom post type with parent in url with cpt ui
版权声明:本文标题:permalinks - How to add rewrite rule to custom post type with parent in url with cpt ui? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749252474a2339917.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论