Permalinks for Custom Post Type that has another Custom Post Type as parent (2 posts)

  1. Fabien Quatravaux
    Posted 3 years ago #

    I have setup in my site two custom posts type : one called "france", and another one called "fiche_pedagogique", both are hierarchical.

    I have also setup tools that allow me to set the parent of a CPT fiche_pedagogique to a CPT france. For example, if I have a CPT france with ID 123 and a CPT fiche_pedagogique can have $post->post_parent = 123.

    Now, when I ask for the CPT fiche_pedagogique permalink, I get something like http://domain.com/fiche_pedagogique/cpt-france-parent-slug/cpt-fiche-pedagogique-slug/, but this URL leads me to a 404 error.
    On the other hand, the URL http://domain.com/fiche_pedagogique/cpt-fiche-pedagogique-slug/ is working well.

    How can I either make the the_permalink() function return the correct URL, or get the first URL (with the CPT parent) work ?

  2. Fabien Quatravaux
    Posted 3 years ago #

    The site is online here : http://cabouge.tv5monde.com/, but there is not direct link examples for the CPT fiche_pedagogique.

Topic Closed

This topic has been closed to new replies.

About this Topic