0

I am about to lose my mind figuring this out. I have a custom post type called "portal" and posts of that type can be the parent of a standard page. To accomplish that I've written code that adds the portal CPT posts to the Parent Page dropdown on the standard page editor. This part works fine, as my child page has the correct permalink:

http://bc-web.local/sustainability/principles/

Portal post permalink: "sustainability"

Child page permalink: "sustainability/principles"

enter image description here

I have flushed my permalinks dozens of times, but the child page still throws a 404.

In order to verify my rewrite rules I installed and ran the Rewrite Analyzer plugin. The results match other pages that work fine.

enter image description here

I then ran the same test on the current production site (that I'm re-developing) where the same page works fine. The results were identical.

enter image description here

I have tried all of this on three separate WP installs (one WAMP, two LAMP), and the results are the same on each.

I'm thinking that the problem has something to do with the .htaccess file, so I tried using the recommended minimum contents for a subdomain multisite install (the conversion of current production includes moving to multisite). Again, no dice.

I'm at my wit's end and running out of ideas, so any and all help is greatly appreciated.

  • I should have mentioned that I'm using Pods for the CPT. Here is the configuration: Screenshot 1 Screenshot 2 – John Dawson Mar 28 at 16:48
  • Trying to set a CPT as a "parent" of a different post type (such as a Page) is bound to confuse WordPress. It would likely be better to set up a separate post type for each "portal" you are using - i.e., have one "sustainability" CPT, whose archive is at /sustainability/ and whose individual posts are at /sustainability/slug/, and then build another post type for whatever other "portal" types you want to create, and so forth. – WebElaine Mar 28 at 18:12
  • Thanks. I've thought about doing that, but I am porting an existing site to multisite, so I need to keep the content as-is. Also, there's another CPT that works the same way. What's weird is that the existing site did exactly what I've done, with no special rewrite rules, and those pages work fine. That's what's driving me nuts. – John Dawson Mar 28 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.