Skip to main content

How to add a base/front slug/url to specific post types?

I currently have:

mywebsite.com/custom-post-type-1/postname

mywebsite.com/custom-post-type-2/postname

I want to achieve:

mywebsite.com/my-base-slug/custom-post-type-1/postname

mywebsite.com/my-base-slug/custom-post-type-2/postname

I do not want "my-base-slug" to appear for anything other than those specified post-types.

Is that possible and how?