I have a page, say streets, which is a static page and has the slug example.com/streets/
, and I want to have many single streets under it. Let these streets be called streetdetails
, so a single street detail would be example.com/streets/streetdetails/1
.
When I create a posttype with Custom Post UI, I always get just top level slugs, such as example.com/streetdetails/1
and I cannot use the frontbase option either, as this is blog
and will create false slugs.
How can I get that page -> posttype setup, that will put a posttype hierarchically under a page slug?
'rewrite' => array( 'slug' => 'streets/streetdetails', 'with_front' => false )
in your register arguments. Make sure to re-save permalinks in the admin after making the code change.