最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom post types - How to set a CPT to have a page as a parent, then rewrite urls accordingly?

programmeradmin4浏览0评论

i have a CPT (called review) for review pages and I want to set these as children of pages i've created.

right now my CPT slug looks like this: example/review/chewy-review

but i have a page on best dog food, and i want it to be a child of that, it should look like this: example/best-dog-food/chewy-review

any ideas how to get this done? The reason i have a CPT is so i can add special CSS and custom fields like pros and cons etc.

There's also many other pages I may want a review to be a child of, like best-dog-diapers (another page), so it will need to change url like this.

Basically i want the CPT to have a url like a page

发布评论

评论列表(0)

  1. 暂无评论