> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: 3763a891-c393-4fdc-b1ca-6971b2a737fa
---

# Hide modules and sections in the page editor

> Learn how to hide modules and sections in the page editor for your custom theme.

When developing a theme, you can configure the `theme.json` to hide specific modules and sections from the editor. This enables you to curate the list of modules and sections available to content creators when building pages, blogs, and global content, rather than having all modules and sections appear for all content types. Using this feature, you can also hide [HubSpot default modules](/cms/reference/modules/default-modules) in favor of your own versions.

You can hide modules and sections in the following ways:

* **Within themes:** you can hide default modules, but not custom modules. Similarly, you cannot hide custom sections in a theme. To exclude a custom module or section from a theme, you should instead delete the module or section from the theme.
* **Within templates:** you can hide default modules, custom modules, and sections.

When hiding modules and sections, keep the following in mind:

* When hiding HubSpot default modules in a <u>template</u>, ensure that the module is wrapped in single quotes (`'`). For example, `'@hubSpot/follow_me'`. This complies with YAML, which template annotations are based on.
* You must use the relative path when specifying a hidden module. Using an absolute path will result in the module not being hidden.

## Hide default modules in a theme

To hide all default modules, set `"hide_all_default_modules": true` in the `theme.json` file

To hide specific default modules in a theme, you'll need to add a list of hidden modules to a `hidden_modules` array in the `theme.json` file.

For example, if you wanted to hide HubSpot's default button and form modules from a theme, your code would look like the following:

```json theme={null}
// example theme.json
{
  "label": "CMS Theme Boilerplate",
  "preview_path": "./templates/home.html",
  "screenshot_path": "./images/template-previews/home.png",
  "enable_domain_stylesheets": false,
  "license": "./license.txt",
  "responsive_breakpoints": [
    {
      "name": "mobile",
      "mediaQuery": "@media (max-width: 767px)",
      "previewWidth": { "value": 477 }
    }
  ],
  "hidden_modules": ["@hubspot/button", "@hubspot/form"]
}
```

To hide all default modules, set `"hide_all_default_modules": true` in `theme.json`.

## Hide modules and sections in a template

To hide modules and sections in a specific template, you'll need to add a list of `hiddenModules` and `hiddenSections` in the template annotations. For example:

```html theme={null}
// example template file
<!--
templateType: page
isAvailableForNewContent: true
label: Ticket listing
screenshotPath: ../images/template-previews/ticket-listing.png
hiddenModules:
- '@hubSpot/follow_me'
- ../modules/form
hiddenSections:
- ../sections/card
-->
```
