WP Permastructure
[resolved] Hierarchical Custom Post Type (2 posts)

  1. Nicolas
    Posted 2 years ago #


    First of all, thanks for this great plugin! As mentioned by Shaliza other plugins won't let you remove the cpt_slug and there are so many forum topics on the subject and each answer gives you a different code to try... that was very confusing!

    So, here is my problem:
    I have 3 CPT, here are my permalink settings with your plugin:

    CPT1 : /%postname%/
    CPT2 : /%category%/%postname%/
    CPT3 : /%category%/%postname%/

    CPT2 and CPT3 are working fine, CPT1 gives me 404 pages.
    I tried to set CPT1 to /%category%/%postname%/ to make sure that the structure wasn't the issue. I still have 404.

    All CPT have been created under the same fucntion, with a similar code, the rewrite attribute is set up as following:
    'rewrite' => array( 'slug' => 'cpt_name', 'with_front' => false) ,

    In fact, the only difference is that CPT1 is hierarchical. So before I use the plugin urls for this post type were like that:
    where subpage2 is a child of page1

    Any idea where the problem is coming from? Thanks


  2. Nicolas
    Posted 2 years ago #

    Hi again,

    Sorry, the problem wasn't coming from the plugin. As I said before I tried many workaround before I found this plugin and my issue was that the slug of most of my custom post type were used by some old deleted pages I had to create to make tests. I cleaned up the DB and not more 404!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Permastructure
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic