WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] Incorrect breadcrumbs/permalinks when CPT parent is static page (3 posts)

  1. petriedish
    Member
    Posted 9 months ago #

    I'm currently working on an animal rescue site that has animals available to sponsor on a monthly basis, as well as animals available to adopt.

    I've created 2 custom post types, one is animals-adopt and one is animals-sponsor, to showcase individual animals.

    In the main settings for each CPT, I've set the Post Relationship as Parent: Page.

    On the individual custom post pages, in the Fields Table metabox where it says This CPT belongs to, I've set the "Sponsor" or "Adoptions" static pages as the parent page for each custom page.

    My problem is that the breadcrumbs and permalinks aren't displaying correctly.

    On the front end for user experience, what I'm trying to achieve is:

    Desired URL structure: http:___.ca/our-work/adoptions/fluffy
    Desired breadcrumb path: Home > Our Work > Adoptions > Fluffy

    (Adoptions is the static parent page, Fluffy is the single CPT page)

    However, what I have is:

    Problem URL structure: http:___.ca/animals-adopt/fluffy
    Problem breadcrumb path: Home > Fluffy

    Also, when I try the "quick edit" option for each custom post, the Parent shows as Main Page (no parent) rather than the static page I've assigned as the parent.

    What am I missing here? Have I skipped a few required steps?

    http://wordpress.org/plugins/types/

  2. Srdjan
    Member
    Plugin Author

    Posted 9 months ago #

    Hi petriedish,
    relationships created are different than native WP relationships between parent and child pages. So WP do not recognize them and URL structure and breadcrumb can not be set as desired. We did not yet schedule any work on custom permalink structure.

    There is a workaround but I'm not sure if there could be possible issues (so I would not quite recommend it):
    1. On custom post edit screen find tab 'Advanced'
    2. check option 'Use a custom URL format'
    3. set it as 'our-work/adoptions'

  3. petriedish
    Member
    Posted 9 months ago #

    I got a great set of instructions and help here. Great support!

    http://wp-types.com/forums/topic/incorrect-urls-when-cpt-single-page-has-static-parent/

Reply

You must log in to post.

About this Plugin

About this Topic