Trying to add array of paths to post permalink
You shouldn’t need to manually handle this with hooks & custom slug settings – just ensure hierarchical is set to true in your register_post_type arguments. You mention “CPT UI” settings, are you referring to the Custom Post Type UI plugin? If so, make sure Hierarchical is set to True in the Settings metabox.