Customize the theme with child themes
If you think that at any point in the future you might want to customize the theme's code in any way (e.g. making small edits to the code, adding new templates or modules... etc.), I'd strongly recommend creating a child theme as a first step.
What is a child theme?
A child theme is a copy of the theme that you can customize without altering the parent theme. Because you're not able to edit Marketplace themes, a child theme is key for any future edits.
It's best to create it from the start, as otherwise you'll need to migrate any pages you've built in the future.
How do I create a child theme?
Follow the steps as outlined in HubSpot's documentation:
- In your HubSpot account, navigate to Marketing > Files and Templates > Design Tools.
- In the finder, click the @marketplace folder for Asset Marketplace themes or the @hubspot folder for default themes.
- Right click a theme folder, then select Create child theme.
- In the dialog box, enter a name for the child theme.
- To change where the child theme will be saved, click Change in the File location section. Click a folder, then click Select.
- To customize the names of the theme's CSS and JS files, click Advanced options, then enter new file names in the CSS and JS fields.
- To finish the process, click Create child theme. You can edit the styling for the child theme in the content editor.
Note: if you're a developer, you can find details on how to create a child theme using the CLI on HubSpot's documentation.
How do I use my child theme?
Once your child theme has been created, you should be able to find it when you create a page:
On the template selection screen, templates from your active theme will appear at the top of the page, while all other templates will be in the Other templates section at the bottom. If you haven’t selected an active theme, hover over a theme and click Set as active theme.