最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

custom post types - Standard Page Child of CPT Not Found (404)

matteradmin8PV0评论

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:

/sustainability/principles/

Portal post permalink: "sustainability"

Child page permalink: "sustainability/principles"

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.

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.

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.

Post a comment

comment list (0)

  1. No comments so far