I know this is probably outside the realm of your support, but I'm really hoping you can help me.
Using the PHP code I found here (enlace oculto) I have removed the slug for my CPT called "office". So now /office/name-of-office/ becomes /name-of-office/
The issue I am running into is I can't get the child pages of /name-of-office/ to load (404 or WordPress redirects it to some similarly named page). I have tried every snippet of PHP that you all have linked to in previous support forums, as well as everything I can find on stack overflow.
This site I'm working on has both listings and sold items nested as child pages under each office, so /name-of-office/listings and /name-of-office/listings/sold/
That plugin pointed me in the right direction, and I found the perfect plugin to fit my needs. It allows for permastructures that kick in automatically when a specific CT is saved/updated: