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

permalinks - Assign same parrent Page to pages AND custom post types

programmeradmin1浏览0评论

I have a page, where I list our current free job positions, let's call it Career. In it's content all custom post types of type job_position are being displayed.

For some specific reasons I need to have couple of subpages, which have the Career page set as their Parrent page (so it displays correctly in breadcrumbs, etc.)

The problem is that once you click some job position, a single CTP page displays like this:

Slug: mysite/job_position/job-name instead of mysite/career/job-name

Breadcrumbs: Home > Job name instead of Job > Career > Job name

I can workaround this by setting the custom slug for my CPT's (either with CPT UI plugin, which I use, or programatically). After that, both slug and breadcrumbs work great for these CPT, but all subpages that have the Career page set as their parrent throw a 404 error (because I messed up the permalink structure by those changes).

Is there a way to do this?

发布评论

评论列表(0)

  1. 暂无评论