Skip to main content
TRUST Documentation

Child Theme

Why Use a Child Theme

A child theme is a copy of an original parent theme. You can edit the child theme without altering the parent theme. 

In HubSpot, it is not possible to edit files for themes purchased from the asset marketplace. While it is possible to build your website using the original parent theme, using a child theme is a future-proof way of building your website.

Setting Up a Child Theme

Creating a child theme requires access to Design Tools (formerly Design Manager), don't worry, no code skills are required! Just follow these steps to create a child theme in your HubSpot account.

  1. In the theme directory on the left sidebar
  2. Navigate to @marketplace -> IMPACT -> Trust
  3. Right-click on the Trust Theme and click Create Child Theme
  4. Enter the name of your child theme
    1. A common practice is to rename your theme to something like “Trust-YourCompany”
    2. Double check each child theme has a unique name. This is to make sure you can find your system pages when the time comes to select them.
  5. Choose a location for your “Trust-YourCompany” theme.
    1. It’s a best practice to leave it in the root folder.
  6. Click [Create Child Theme]
    1. If you take a look at the advanced options, you’ll be able to name your css and js files – these are created along with your theme. Or you can go ahead and leave the defaults, too.
  7. Once your theme is created, you’ll see a success alert.
  8. You can now click “Close”
  9. You should now see your Child Theme in the left sidebar.

IMPORTANT: These are the ONLY files needed in the child theme to build your website, all of the templates and modules are inherited from the marketplace theme and would only be cloned to the child if you are creating a custom-coded template or module.

For information about creating a child theme using the CLI, visit HubSpot's Documentation.

 

Using your Child Theme

Congrats! You’re ready to use your child theme!

Once you’ve got everything set up, all you’ll need to do is choose your child theme the next time you build a page. After you’ve made that selection, the first time, your default theme will be set to your child theme and you should not need to re-select it unless you’re updating existing pages.