Skip to main content

Interface: WpThemeJSON

Defined in: packages/core/src/react/provider/types.ts:95

Properties

$schema?

optional $schema: string

Defined in: packages/core/src/react/provider/types.ts:99

JSON schema URI for theme.json.


customTemplates?

optional customTemplates: object[]

Defined in: packages/core/src/react/provider/types.ts:319

Additional metadata for custom templates defined in the templates folder.

name

name: string

Filename, without extension, of the template in the templates folder.

postTypes?

optional postTypes: string[]

List of post types that can use this custom template.

title

title: string

Title of the template, translatable.


settings?

optional settings: SettingsProperties & object

Defined in: packages/core/src/react/provider/types.ts:111

Settings for the block editor and individual blocks. These include things like:

  • Which customization options should be available to the user.
  • The default colors, font sizes... available to the user.
  • CSS custom properties and class names used in styles.
  • And the default layout of the editor (widths and available alignments).

Type declaration

blocks?

optional blocks: object

Settings defined on a per-block basis.

blocks.core/archives?

optional blocks.core/archives: SettingsPropertiesComplete

blocks.core/audio?

optional blocks.core/audio: SettingsPropertiesComplete

blocks.core/block?

optional blocks.core/block: SettingsPropertiesComplete

blocks.core/button?

optional blocks.core/button: SettingsPropertiesComplete

blocks.core/buttons?

optional blocks.core/buttons: SettingsPropertiesComplete

blocks.core/calendar?

optional blocks.core/calendar: SettingsPropertiesComplete

blocks.core/categories?

optional blocks.core/categories: SettingsPropertiesComplete

blocks.core/code?

optional blocks.core/code: SettingsPropertiesComplete

blocks.core/column?

optional blocks.core/column: SettingsPropertiesComplete

blocks.core/columns?

optional blocks.core/columns: SettingsPropertiesComplete

blocks.core/comment-author-avatar?

optional blocks.core/comment-author-avatar: SettingsPropertiesComplete

blocks.core/comment-author-name?

optional blocks.core/comment-author-name: SettingsPropertiesComplete

blocks.core/comment-content?

optional blocks.core/comment-content: SettingsPropertiesComplete

blocks.core/comment-date?

optional blocks.core/comment-date: SettingsPropertiesComplete

optional blocks.core/comment-edit-link: SettingsPropertiesComplete

optional blocks.core/comment-reply-link: SettingsPropertiesComplete

blocks.core/comment-template?

optional blocks.core/comment-template: SettingsPropertiesComplete

blocks.core/comments-query-loop?

optional blocks.core/comments-query-loop: SettingsPropertiesComplete

blocks.core/cover?

optional blocks.core/cover: SettingsPropertiesComplete

blocks.core/embed?

optional blocks.core/embed: SettingsPropertiesComplete

blocks.core/file?

optional blocks.core/file: SettingsPropertiesComplete

blocks.core/freeform?

optional blocks.core/freeform: SettingsPropertiesComplete

blocks.core/gallery?

optional blocks.core/gallery: SettingsPropertiesComplete

blocks.core/group?

optional blocks.core/group: SettingsPropertiesComplete

blocks.core/heading?

optional blocks.core/heading: SettingsPropertiesComplete

optional blocks.core/home-link: SettingsPropertiesComplete

blocks.core/html?

optional blocks.core/html: SettingsPropertiesComplete

blocks.core/image?

optional blocks.core/image: SettingsPropertiesComplete

blocks.core/latest-comments?

optional blocks.core/latest-comments: SettingsPropertiesComplete

blocks.core/latest-posts?

optional blocks.core/latest-posts: SettingsPropertiesComplete

blocks.core/legacy-widget?

optional blocks.core/legacy-widget: SettingsPropertiesComplete

blocks.core/list?

optional blocks.core/list: SettingsPropertiesComplete

blocks.core/loginout?

optional blocks.core/loginout: SettingsPropertiesComplete

blocks.core/media-text?

optional blocks.core/media-text: SettingsPropertiesComplete

blocks.core/missing?

optional blocks.core/missing: SettingsPropertiesComplete

blocks.core/more?

optional blocks.core/more: SettingsPropertiesComplete

blocks.core/navigation?

optional blocks.core/navigation: SettingsPropertiesComplete

optional blocks.core/navigation-link: SettingsPropertiesComplete

blocks.core/nextpage?

optional blocks.core/nextpage: SettingsPropertiesComplete

blocks.core/page-list?

optional blocks.core/page-list: SettingsPropertiesComplete

blocks.core/paragraph?

optional blocks.core/paragraph: SettingsPropertiesComplete

blocks.core/post-author?

optional blocks.core/post-author: SettingsPropertiesComplete

blocks.core/post-comments?

optional blocks.core/post-comments: SettingsPropertiesComplete

blocks.core/post-comments-count?

optional blocks.core/post-comments-count: SettingsPropertiesComplete

blocks.core/post-comments-form?

optional blocks.core/post-comments-form: SettingsPropertiesComplete

optional blocks.core/post-comments-link: SettingsPropertiesComplete

blocks.core/post-content?

optional blocks.core/post-content: SettingsPropertiesComplete

blocks.core/post-date?

optional blocks.core/post-date: SettingsPropertiesComplete

blocks.core/post-excerpt?

optional blocks.core/post-excerpt: SettingsPropertiesComplete

optional blocks.core/post-featured-image: SettingsPropertiesComplete

optional blocks.core/post-navigation-link: SettingsPropertiesComplete

blocks.core/post-template?

optional blocks.core/post-template: SettingsPropertiesComplete

blocks.core/post-terms?

optional blocks.core/post-terms: SettingsPropertiesComplete

blocks.core/post-title?

optional blocks.core/post-title: SettingsPropertiesComplete

blocks.core/preformatted?

optional blocks.core/preformatted: SettingsPropertiesComplete

blocks.core/pullquote?

optional blocks.core/pullquote: SettingsPropertiesComplete

blocks.core/query?

optional blocks.core/query: SettingsPropertiesComplete

blocks.core/query-pagination?

optional blocks.core/query-pagination: SettingsPropertiesComplete

blocks.core/query-pagination-next?

optional blocks.core/query-pagination-next: SettingsPropertiesComplete

blocks.core/query-pagination-numbers?

optional blocks.core/query-pagination-numbers: SettingsPropertiesComplete

blocks.core/query-pagination-previous?

optional blocks.core/query-pagination-previous: SettingsPropertiesComplete

blocks.core/query-title?

optional blocks.core/query-title: SettingsPropertiesComplete

blocks.core/quote?

optional blocks.core/quote: SettingsPropertiesComplete

blocks.core/rss?

optional blocks.core/rss: SettingsPropertiesComplete

blocks.core/search?

optional blocks.core/search: SettingsPropertiesComplete

blocks.core/separator?

optional blocks.core/separator: SettingsPropertiesComplete

blocks.core/shortcode?

optional blocks.core/shortcode: SettingsPropertiesComplete

optional blocks.core/site-logo: SettingsPropertiesComplete

blocks.core/site-tagline?

optional blocks.core/site-tagline: SettingsPropertiesComplete

blocks.core/site-title?

optional blocks.core/site-title: SettingsPropertiesComplete

optional blocks.core/social-link: SettingsPropertiesComplete

optional blocks.core/social-links: SettingsPropertiesComplete

blocks.core/spacer?

optional blocks.core/spacer: SettingsPropertiesComplete

blocks.core/table?

optional blocks.core/table: SettingsPropertiesComplete

blocks.core/table-of-contents?

optional blocks.core/table-of-contents: SettingsPropertiesComplete

blocks.core/tag-cloud?

optional blocks.core/tag-cloud: SettingsPropertiesComplete

blocks.core/template-part?

optional blocks.core/template-part: SettingsPropertiesComplete

blocks.core/term-description?

optional blocks.core/term-description: SettingsPropertiesComplete

blocks.core/text-columns?

optional blocks.core/text-columns: SettingsPropertiesComplete

blocks.core/verse?

optional blocks.core/verse: SettingsPropertiesComplete

blocks.core/video?

optional blocks.core/video: SettingsPropertiesComplete

blocks.core/widget-area?

optional blocks.core/widget-area: SettingsPropertiesComplete

blocks.core/widget-group?

optional blocks.core/widget-group: SettingsPropertiesComplete

border?

optional border: object

border.color?

optional border.color: boolean

Allow users to set custom border colors.

border.radius?

optional border.radius: boolean

Allow users to set custom border radius.

border.style?

optional border.style: boolean

Allow users to set custom border styles.

border.width?

optional border.width: boolean

Allow users to set custom border widths.

color?

optional color: object

color.background?

optional color.background: boolean

Allow users to set background colors.

color.custom?

optional color.custom: boolean

Allow users to select custom colors.

color.customDuotone?

optional color.customDuotone: boolean

Allow users to create custom duotone filters.

color.customGradient?

optional color.customGradient: boolean

Allow users to create custom gradients.

color.defaultGradients?

optional color.defaultGradients: boolean

Allow users to choose colors from the default gradients.

color.defaultPalette?

optional color.defaultPalette: boolean

Allow users to choose colors from the default palette.

color.duotone?

optional color.duotone: SettingsDuotone

Duotone presets for the duotone picker. Doesn't generate classes or properties.

color.gradients?

optional color.gradients: SettingsGradient

Gradient presets for the gradient picker. Generates a single class (.has-{slug}-background) and custom property (--wp--preset--gradient--{slug}) per preset value.

optional color.link: boolean

Allow users to set link colors.

color.palette?

optional color.palette: SettingsColorPalette

Color palette presets for the color picker. Generates three classes (.has-{slug}-color, .has-{slug}-background-color, and .has-{slug}-border-color) and a single custom property (--wp--preset--color--{slug}) per preset value.

color.text?

optional color.text: boolean

Allow users to set text colors.

custom?

optional custom: object

Index Signature

[k: string]: string | number | SettingsCustomAdditionalProperties

layout?

optional layout: object

layout.contentSize?

optional layout.contentSize: string

Sets the max-width of the content.

layout.wideSize?

optional layout.wideSize: string

Sets the max-width of wide (.alignwide) content.

spacing?

optional spacing: object

spacing.blockGap?

optional spacing.blockGap: null | boolean

Enables --wp--style--block-gap to be generated from styles.spacing.blockGap. A value of null instead of false further disables layout styles from being generated.

spacing.margin?

optional spacing.margin: boolean

Allow users to set a custom margin.

spacing.padding?

optional spacing.padding: boolean

Allow users to set a custom padding.

spacing.units?

optional spacing.units: string[]

List of units the user can use for spacing values.

typography?

optional typography: object

typography.customFontSize?

optional typography.customFontSize: boolean

Allow users to set custom font sizes.

typography.dropCap?

optional typography.dropCap: boolean

Enable drop cap.

typography.fontFamilies?

optional typography.fontFamilies: object[]

Font family presets for the font family selector. Generates a single custom property (--wp--preset--font-family--{slug}) per preset value.

typography.fontSizes?

optional typography.fontSizes: object[]

Font size presets for the font size selector. Generates a single class (.has-{slug}-color) and custom property (--wp--preset--font-size--{slug}) per preset value.

typography.fontStyle?

optional typography.fontStyle: boolean

Allow users to set custom font styles.

typography.fontWeight?

optional typography.fontWeight: boolean

Allow users to set custom font weights.

typography.letterSpacing?

optional typography.letterSpacing: boolean

Allow users to set custom letter spacing.

typography.lineHeight?

optional typography.lineHeight: boolean

Allow users to set custom line height.

typography.textDecoration?

optional typography.textDecoration: boolean

Allow users to set custom text decorations.

typography.textTransform?

optional typography.textTransform: boolean

Allow users to set custom text transforms.


styles?

optional styles: StylesProperties & object

Defined in: packages/core/src/react/provider/types.ts:210

Organized way to set CSS properties. Styles in the top-level will be added in the body selector.

Type declaration

blocks?

optional blocks: object

Styles defined on a per-block basis using the block's selector.

blocks.core/archives?

optional blocks.core/archives: StylesPropertiesAndElementsComplete

blocks.core/audio?

optional blocks.core/audio: StylesPropertiesAndElementsComplete

blocks.core/block?

optional blocks.core/block: StylesPropertiesAndElementsComplete

blocks.core/button?

optional blocks.core/button: StylesPropertiesAndElementsComplete

blocks.core/buttons?

optional blocks.core/buttons: StylesPropertiesAndElementsComplete

blocks.core/calendar?

optional blocks.core/calendar: StylesPropertiesAndElementsComplete

blocks.core/categories?

optional blocks.core/categories: StylesPropertiesAndElementsComplete

blocks.core/code?

optional blocks.core/code: StylesPropertiesAndElementsComplete

blocks.core/column?

optional blocks.core/column: StylesPropertiesAndElementsComplete

blocks.core/columns?

optional blocks.core/columns: StylesPropertiesAndElementsComplete

blocks.core/comment-author-avatar?

optional blocks.core/comment-author-avatar: StylesPropertiesAndElementsComplete

blocks.core/comment-author-name?

optional blocks.core/comment-author-name: StylesPropertiesAndElementsComplete

blocks.core/comment-content?

optional blocks.core/comment-content: StylesPropertiesAndElementsComplete

blocks.core/comment-date?

optional blocks.core/comment-date: StylesPropertiesAndElementsComplete

optional blocks.core/comment-edit-link: StylesPropertiesAndElementsComplete

optional blocks.core/comment-reply-link: StylesPropertiesAndElementsComplete

blocks.core/comment-template?

optional blocks.core/comment-template: StylesPropertiesAndElementsComplete

blocks.core/comments-query-loop?

optional blocks.core/comments-query-loop: StylesPropertiesAndElementsComplete

blocks.core/cover?

optional blocks.core/cover: StylesPropertiesAndElementsComplete

blocks.core/embed?

optional blocks.core/embed: StylesPropertiesAndElementsComplete

blocks.core/file?

optional blocks.core/file: StylesPropertiesAndElementsComplete

blocks.core/freeform?

optional blocks.core/freeform: StylesPropertiesAndElementsComplete

blocks.core/gallery?

optional blocks.core/gallery: StylesPropertiesAndElementsComplete

blocks.core/group?

optional blocks.core/group: StylesPropertiesAndElementsComplete

blocks.core/heading?

optional blocks.core/heading: StylesPropertiesAndElementsComplete

optional blocks.core/home-link: StylesPropertiesAndElementsComplete

blocks.core/html?

optional blocks.core/html: StylesPropertiesAndElementsComplete

blocks.core/image?

optional blocks.core/image: StylesPropertiesAndElementsComplete

blocks.core/latest-comments?

optional blocks.core/latest-comments: StylesPropertiesAndElementsComplete

blocks.core/latest-posts?

optional blocks.core/latest-posts: StylesPropertiesAndElementsComplete

blocks.core/legacy-widget?

optional blocks.core/legacy-widget: StylesPropertiesAndElementsComplete

blocks.core/list?

optional blocks.core/list: StylesPropertiesAndElementsComplete

blocks.core/loginout?

optional blocks.core/loginout: StylesPropertiesAndElementsComplete

blocks.core/media-text?

optional blocks.core/media-text: StylesPropertiesAndElementsComplete

blocks.core/missing?

optional blocks.core/missing: StylesPropertiesAndElementsComplete

blocks.core/more?

optional blocks.core/more: StylesPropertiesAndElementsComplete

blocks.core/navigation?

optional blocks.core/navigation: StylesPropertiesAndElementsComplete

optional blocks.core/navigation-link: StylesPropertiesAndElementsComplete

blocks.core/nextpage?

optional blocks.core/nextpage: StylesPropertiesAndElementsComplete

blocks.core/page-list?

optional blocks.core/page-list: StylesPropertiesAndElementsComplete

blocks.core/paragraph?

optional blocks.core/paragraph: StylesPropertiesAndElementsComplete

blocks.core/post-author?

optional blocks.core/post-author: StylesPropertiesAndElementsComplete

blocks.core/post-comments?

optional blocks.core/post-comments: StylesPropertiesAndElementsComplete

blocks.core/post-comments-count?

optional blocks.core/post-comments-count: StylesPropertiesAndElementsComplete

blocks.core/post-comments-form?

optional blocks.core/post-comments-form: StylesPropertiesAndElementsComplete

optional blocks.core/post-comments-link: StylesPropertiesAndElementsComplete

blocks.core/post-content?

optional blocks.core/post-content: StylesPropertiesAndElementsComplete

blocks.core/post-date?

optional blocks.core/post-date: StylesPropertiesAndElementsComplete

blocks.core/post-excerpt?

optional blocks.core/post-excerpt: StylesPropertiesAndElementsComplete

optional blocks.core/post-featured-image: StylesPropertiesAndElementsComplete

optional blocks.core/post-navigation-link: StylesPropertiesAndElementsComplete

blocks.core/post-template?

optional blocks.core/post-template: StylesPropertiesAndElementsComplete

blocks.core/post-terms?

optional blocks.core/post-terms: StylesPropertiesAndElementsComplete

blocks.core/post-title?

optional blocks.core/post-title: StylesPropertiesAndElementsComplete

blocks.core/preformatted?

optional blocks.core/preformatted: StylesPropertiesAndElementsComplete

blocks.core/pullquote?

optional blocks.core/pullquote: StylesPropertiesAndElementsComplete

blocks.core/query?

optional blocks.core/query: StylesPropertiesAndElementsComplete

blocks.core/query-pagination?

optional blocks.core/query-pagination: StylesPropertiesAndElementsComplete

blocks.core/query-pagination-next?

optional blocks.core/query-pagination-next: StylesPropertiesAndElementsComplete

blocks.core/query-pagination-numbers?

optional blocks.core/query-pagination-numbers: StylesPropertiesAndElementsComplete

blocks.core/query-pagination-previous?

optional blocks.core/query-pagination-previous: StylesPropertiesAndElementsComplete

blocks.core/query-title?

optional blocks.core/query-title: StylesPropertiesAndElementsComplete

blocks.core/quote?

optional blocks.core/quote: StylesPropertiesAndElementsComplete

blocks.core/rss?

optional blocks.core/rss: StylesPropertiesAndElementsComplete

blocks.core/search?

optional blocks.core/search: StylesPropertiesAndElementsComplete

blocks.core/separator?

optional blocks.core/separator: StylesPropertiesAndElementsComplete

blocks.core/shortcode?

optional blocks.core/shortcode: StylesPropertiesAndElementsComplete

blocks.core/site-logo?

optional blocks.core/site-logo: StylesPropertiesAndElementsComplete

blocks.core/site-tagline?

optional blocks.core/site-tagline: StylesPropertiesAndElementsComplete

blocks.core/site-title?

optional blocks.core/site-title: StylesPropertiesAndElementsComplete

optional blocks.core/social-link: StylesPropertiesAndElementsComplete

optional blocks.core/social-links: StylesPropertiesAndElementsComplete

blocks.core/spacer?

optional blocks.core/spacer: StylesPropertiesAndElementsComplete

blocks.core/table?

optional blocks.core/table: StylesPropertiesAndElementsComplete

blocks.core/table-of-contents?

optional blocks.core/table-of-contents: StylesPropertiesAndElementsComplete

blocks.core/tag-cloud?

optional blocks.core/tag-cloud: StylesPropertiesAndElementsComplete

blocks.core/template-part?

optional blocks.core/template-part: StylesPropertiesAndElementsComplete

blocks.core/term-description?

optional blocks.core/term-description: StylesPropertiesAndElementsComplete

blocks.core/text-columns?

optional blocks.core/text-columns: StylesPropertiesAndElementsComplete

blocks.core/verse?

optional blocks.core/verse: StylesPropertiesAndElementsComplete

blocks.core/video?

optional blocks.core/video: StylesPropertiesAndElementsComplete

blocks.core/widget-area?

optional blocks.core/widget-area: StylesPropertiesAndElementsComplete

blocks.core/widget-group?

optional blocks.core/widget-group: StylesPropertiesAndElementsComplete

border?

optional border: unknown

color?

optional color: unknown

elements?

optional elements: object

Styles defined on a per-element basis using the element's selector.

elements.h1?

optional elements.h1: StylesPropertiesComplete

elements.h2?

optional elements.h2: StylesPropertiesComplete

elements.h3?

optional elements.h3: StylesPropertiesComplete

elements.h4?

optional elements.h4: StylesPropertiesComplete

elements.h5?

optional elements.h5: StylesPropertiesComplete

elements.h6?

optional elements.h6: StylesPropertiesComplete

optional elements.link: StylesPropertiesComplete

spacing?

optional spacing: unknown

typography?

optional typography: unknown


templateParts?

optional templateParts: object[]

Defined in: packages/core/src/react/provider/types.ts:336

Additional metadata for template parts defined in the parts folder.

area?

optional area: string

The area the template part is used for. Block variations for header and footer values exist and will be used when the area is set to one of those.

name

name: string

Filename, without extension, of the template in the parts folder.

title?

optional title: string

Title of the template, translatable.


version

version: 2

Defined in: packages/core/src/react/provider/types.ts:103

Version of theme.json to use.