Remove Parent Theme page layout options from child theme selector

Hello,

I have cloned the HubSpot Growth theme to a child theme. I have added some additional page templates, which is working great.

The problem is, when I go to create a new page or change a template, all of the templates from the parent theme appear as options and I don’t want them to.

Since I can’t delete them, what options do I have to remove them from showing up in the selector? Can I decouple my child theme from the parent theme if I’ve copied over all of the elements?

I want to limit my templates to just Blank and Landing page, but when I got to create a new page from my theme, I see all the parent theme page template options as well (e.g. About, Conference, etc). See screenshot.

Thanks!

Thanks for your post, @redbranchmedia!

I understand you still see all parent theme templates when choosing a template, rather than just the child theme templates. I want to invite some subject matter experts to see if they have any suggestions.

Hey @Jnix284, @mangelet do you have any child theme experience to share here? Is it possible to separate those from the parent theme in the template switcher?

Best,

Kennedy

Hey @kennedyp thanks for the tag and sorry for the delayed response @redbranchmedia

The good news, I do think it’s possible - albeit a little bit of a workaround.

1 - clone all templates from the parent to the child, keeping the same file name

This will overwrite the parent templates and force the child templates to be the preferred template file.

2 - edit each template in the child theme to change the availability for creating new content

The default for templates is:

isAvailableForNewContent: true

when you change this to

isAvailableForNewContent: false

it will prevent the user from using that template for new content.