Using custom post type parent as slug

I’m currently using the plugin ‘Types Custom Post Type’ to create custom post types (I know it’s pretty easily done through functions.php but I was feeling a bit lazy!).

Basically, I’m looking to have the following format for pages:

/wellbean-cottage/ – the main page for a house

/wellbean-cottage/things-to-do/ – a child page with information about the house

I thought the best option would be to create a different post type for these sub-pages, but unfortunately it doesn’t seem to add the house slug beforehand. Does anyone have any idea how it can be set up to work like this?

Thank you in advance!

1 Answer
1

Not sure if I understood you right, but there’s an option when registering the custom post type:

register_post_type( 'your_cpt_name', array(
    'rewrite' => array( 'with_front' => true )
) );

Leave a Comment