How to add /blog/ prefix only for standard posts (Bricks + WordPress)

Hey!

may be a stupid question that is more wp than bricks related but:

I’m trying to configure my WordPress + Bricks site so that only standard blog posts have a /blog/ prefix in their URL, e.g.:

https://example.com/blog/post-title/

I don’t want this prefix to appear for pages or other custom post types (e.g. portfolio should remain https://example.com/portfolio/item-name/).

What I tried:
Setting a custom permalink structure /blog/%postname%/ in Settings → Permalinks → works for posts, but also adds /blog/ in front of all CPTs

Has anyone implemented this successfully and can share the code or recommended approach?

Thanks!

Create a category named blog and try the default WordPress %category%/%postname%

if there’s no category, it should skip it.

Or try the slug option on WordPress. Enable by right top screen options, check slug.

Inside the CPT settings you should also be able to define a slug/prefix for the CPT maybe to remove unwanted added categories.