Schema URL

Type: object

Properties

version integer required

Version of theme.json to use. Since 5.8.

Values: 1
$schema string

JSON schema URI for theme.json.

settings object

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). Since 5.8.
All of: settingsProperties, object object
styles object

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

All of: stylesProperties, object object
customTemplates object[]

Additional metadata for custom templates defined in the block-templates folder. Gutenberg plugin required.

templateParts object[]

Additional metadata for template parts defined in the block-template-parts folder. Gutenberg plugin required.

Definitions

//
settingsProperties
border object

Settings related to borders. Gutenberg plugin required.

4 nested properties
customColor boolean

Allow users to set custom border colors. Gutenberg plugin required.

Default: false
customRadius boolean

Allow users to set custom border radius. Gutenberg plugin required.

Default: false
customStyle boolean

Allow users to set custom border styles. Gutenberg plugin required.

Default: false
customWidth boolean

Allow users to set custom border widths. Gutenberg plugin required.

Default: false
color object

Settings related to colors. Since 5.8.

9 nested properties
background boolean

Allow users to set background colors. Gutenberg plugin required.

Default: true
custom boolean

Allow users to select custom colors. Since 5.8.

Default: true
customDuotone boolean

Allow users to create custom duotone filters. Since 5.8.

Default: true
customGradient boolean

Allow users to create custom gradients. Since 5.8.

Default: true
duotone object[]

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

gradients object[]

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

link boolean

Allow users to set link colors. Since 5.8.

Default: false
palette object[]

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. Since 5.8.

text boolean

Allow users to set text colors. Gutenberg plugin required.

Default: true
layout object

Settings related to layout. Since 5.8.

2 nested properties
contentSize string

Sets the max-width of the content. Since 5.8.

wideSize string

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

spacing object

Settings related to spacing. Since 5.8.

4 nested properties
blockGap boolean | null

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. Gutenberg plugin required.

Default: null
customMargin boolean

Allow users to set a custom margin. Since 5.8.

Default: false
customPadding boolean

Allow users to set a custom padding. Since 5.8.

Default: false
units string[]

List of units the user can use for spacing values. Since 5.8.

Default:
[
  "px",
  "em",
  "rem",
  "vh",
  "vw",
  "%"
]
typography object

Settings related to typography. Since 5.8.

10 nested properties
customFontSize boolean

Allow users to set custom font sizes. Since 5.8.

Default: true
customFontStyle boolean

Allow users to set custom font styles. Gutenberg plugin required.

Default: true
customFontWeight boolean

Allow users to set custom font weights. Gutenberg plugin required.

Default: true
customLetterSpacing boolean

Allow users to set custom letter spacing. Gutenberg plugin required.

Default: true
customLineHeight boolean

Allow users to set custom line height. Since 5.8.

Default: false
customTextDecorations boolean

Allow users to set custom text decorations. Gutenberg plugin required.

Default: true
customTextTransforms boolean

Allow users to set custom text transforms. Gutenberg plugin required.

Default: true
dropCap boolean

Enable drop cap. Since 5.8.

Default: true
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. Since 5.8.

fontFamilies object[]

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

custom Record<string, string | number | settingsCustomAdditionalProperties>
settingsPropertiesComplete object
settingsBlocksPropertiesComplete object
core/archives object
All of: settingsProperties, object object
core/audio object
All of: settingsProperties, object object
core/block object
All of: settingsProperties, object object
core/button object
All of: settingsProperties, object object
core/buttons object
All of: settingsProperties, object object
core/calendar object
All of: settingsProperties, object object
core/categories object
All of: settingsProperties, object object
core/code object
All of: settingsProperties, object object
core/column object
All of: settingsProperties, object object
core/columns object
All of: settingsProperties, object object
core/cover object
All of: settingsProperties, object object
core/embed object
All of: settingsProperties, object object
core/file object
All of: settingsProperties, object object
core/freeform object
All of: settingsProperties, object object
core/gallery object
All of: settingsProperties, object object
core/group object
All of: settingsProperties, object object
core/heading object
All of: settingsProperties, object object
core/home-link object
All of: settingsProperties, object object
core/html object
All of: settingsProperties, object object
core/image object
All of: settingsProperties, object object
core/latest-comments object
All of: settingsProperties, object object
core/latest-posts object
All of: settingsProperties, object object
core/list object
All of: settingsProperties, object object
core/loginout object
All of: settingsProperties, object object
core/media-text object
All of: settingsProperties, object object
core/missing object
All of: settingsProperties, object object
core/more object
All of: settingsProperties, object object
core/navigation object
All of: settingsProperties, object object
core/navigation-link object
All of: settingsProperties, object object
core/nextpage object
All of: settingsProperties, object object
core/page-list object
All of: settingsProperties, object object
core/paragraph object
All of: settingsProperties, object object
core/post-author object
All of: settingsProperties, object object
core/post-comment object
All of: settingsProperties, object object
core/post-comment-author object
All of: settingsProperties, object object
core/post-comment-content object
All of: settingsProperties, object object
core/post-comment-date object
All of: settingsProperties, object object
core/post-comments object
All of: settingsProperties, object object
core/post-comments-count object
All of: settingsProperties, object object
core/post-comments-form object
All of: settingsProperties, object object
core/post-comments-link object
All of: settingsProperties, object object
core/post-content object
All of: settingsProperties, object object
core/post-date object
All of: settingsProperties, object object
core/post-excerpt object
All of: settingsProperties, object object
core/post-featured-image object
All of: settingsProperties, object object
core/post-navigation-link object
All of: settingsProperties, object object
core/post-template object
All of: settingsProperties, object object
core/post-terms object
All of: settingsProperties, object object
core/post-title object
All of: settingsProperties, object object
core/preformatted object
All of: settingsProperties, object object
core/pullquote object
All of: settingsProperties, object object
core/query object
All of: settingsProperties, object object
core/query-pagination object
All of: settingsProperties, object object
core/query-pagination-next object
All of: settingsProperties, object object
core/query-pagination-numbers object
All of: settingsProperties, object object
core/query-pagination-previous object
All of: settingsProperties, object object
core/query-title object
All of: settingsProperties, object object
core/quote object
All of: settingsProperties, object object
core/rss object
All of: settingsProperties, object object
core/search object
All of: settingsProperties, object object
core/separator object
All of: settingsProperties, object object
core/shortcode object
All of: settingsProperties, object object
core/site-logo object
All of: settingsProperties, object object
core/site-tagline object
All of: settingsProperties, object object
core/site-title object
All of: settingsProperties, object object
core/social-link object
All of: settingsProperties, object object
core/social-links object
All of: settingsProperties, object object
core/spacer object
All of: settingsProperties, object object
core/table object
All of: settingsProperties, object object
core/table-of-contents object
All of: settingsProperties, object object
core/tag-cloud object
All of: settingsProperties, object object
core/template-part object
All of: settingsProperties, object object
core/term-description object
All of: settingsProperties, object object
core/text-columns object
All of: settingsProperties, object object
core/verse object
All of: settingsProperties, object object
core/video object
All of: settingsProperties, object object
core/widget-area object
All of: settingsProperties, object object
core/legacy-widget object
All of: settingsProperties, object object
core/widget-group object
All of: settingsProperties, object object
settingsCustomAdditionalProperties Record<string, string | number | settingsCustomAdditionalProperties>
stylesProperties
border object

Border styles. Gutenberg plugin required.

4 nested properties
color string

Sets the border-color CSS property. Gutenberg plugin required.

radius string

Sets the border-radius CSS property. Gutenberg plugin required.

style string

Sets the border-style CSS property. Gutenberg plugin required.

width string

Sets the border-width CSS property. Gutenberg plugin required.

color object

Color styles. Since 5.8.

3 nested properties
background string

Sets the background-color CSS property. Since 5.8.

gradient string

Sets the background CSS property. Since 5.8.

text string

Sets the color CSS property. Since 5.8.

spacing object

Spacing styles. Since 5.8.

3 nested properties
blockGap string

Sets the --wp--style--block-gap CSS custom property when settings.spacing.blockGap is true.

margin object

Margin styles. Since 5.8.

4 nested properties
top string

Sets the margin-top CSS property. Since 5.8.

right string

Sets the margin-right CSS property. Since 5.8.

bottom string

Sets the margin-bottom CSS property. Since 5.8.

left string

Sets the margin-left CSS property. Since 5.8.

padding object

Padding styles. Since 5.8.

4 nested properties
top string

Sets the padding-top CSS property. Since 5.8.

right string

Sets the padding-right CSS property. Since 5.8.

bottom string

Sets the padding-bottom CSS property. Since 5.8.

left string

Sets the padding-left CSS property. Since 5.8.

typography object

Typography styles. Since 5.8.

8 nested properties
fontFamily string

Sets the font-family CSS property. Gutenberg plugin required.

fontSize string

Sets the font-size CSS property. Since 5.8.

fontStyle string

Sets the font-style CSS property. Gutenberg plugin required.

fontWeight string

Sets the font-weight CSS property. Gutenberg plugin required.

letterSpacing string

Sets the letter-spacing CSS property. Gutenberg plugin required.

lineHeight string

Sets the line-height CSS property. Since 5.8.

textDecoration string

Sets the text-decoration CSS property. Gutenberg plugin required.

textTransform string

Sets the text-transform CSS property. Gutenberg plugin required.

stylesPropertiesComplete object
stylesElementsPropertiesComplete object
link object
All of: stylesProperties, object object
h1 object
All of: stylesProperties, object object
h2 object
All of: stylesProperties, object object
h3 object
All of: stylesProperties, object object
h4 object
All of: stylesProperties, object object
h5 object
All of: stylesProperties, object object
h6 object
All of: stylesProperties, object object
stylesBlocksPropertiesComplete object
core/archives object
All of: stylesProperties, object object
core/audio object
All of: stylesProperties, object object
core/block object
All of: stylesProperties, object object
core/button object
All of: stylesProperties, object object
core/buttons object
All of: stylesProperties, object object
core/calendar object
All of: stylesProperties, object object
core/categories object
All of: stylesProperties, object object
core/code object
All of: stylesProperties, object object
core/column object
All of: stylesProperties, object object
core/columns object
All of: stylesProperties, object object
core/cover object
All of: stylesProperties, object object
core/embed object
All of: stylesProperties, object object
core/file object
All of: stylesProperties, object object
core/freeform object
All of: stylesProperties, object object
core/gallery object
All of: stylesProperties, object object
core/group object
All of: stylesProperties, object object
core/heading object
All of: stylesProperties, object object
core/home-link object
All of: stylesProperties, object object
core/html object
All of: stylesProperties, object object
core/image object
All of: stylesProperties, object object
core/latest-comments object
All of: stylesProperties, object object
core/latest-posts object
All of: stylesProperties, object object
core/list object
All of: stylesProperties, object object
core/loginout object
All of: stylesProperties, object object
core/media-text object
All of: stylesProperties, object object
core/missing object
All of: stylesProperties, object object
core/more object
All of: stylesProperties, object object
core/navigation object
All of: stylesProperties, object object
core/navigation-link object
All of: stylesProperties, object object
core/nextpage object
All of: stylesProperties, object object
core/page-list object
All of: stylesProperties, object object
core/paragraph object
All of: stylesProperties, object object
core/post-author object
All of: stylesProperties, object object
core/post-comment object
All of: stylesProperties, object object
core/post-comment-author object
All of: stylesProperties, object object
core/post-comment-content object
All of: stylesProperties, object object
core/post-comment-date object
All of: stylesProperties, object object
core/post-comments object
All of: stylesProperties, object object
core/post-comments-count object
All of: stylesProperties, object object
core/post-comments-form object
All of: stylesProperties, object object
core/post-comments-link object
All of: stylesProperties, object object
core/post-content object
All of: stylesProperties, object object
core/post-date object
All of: stylesProperties, object object
core/post-excerpt object
All of: stylesProperties, object object
core/post-featured-image object
All of: stylesProperties, object object
core/post-navigation-link object
All of: stylesProperties, object object
core/post-template object
All of: stylesProperties, object object
core/post-terms object
All of: stylesProperties, object object
core/post-title object
All of: stylesProperties, object object
core/preformatted object
All of: stylesProperties, object object
core/pullquote object
All of: stylesProperties, object object
core/query object
All of: stylesProperties, object object
core/query-pagination object
All of: stylesProperties, object object
core/query-pagination-next object
All of: stylesProperties, object object
core/query-pagination-numbers object
All of: stylesProperties, object object
core/query-pagination-previous object
All of: stylesProperties, object object
core/query-title object
All of: stylesProperties, object object
core/quote object
All of: stylesProperties, object object
core/rss object
All of: stylesProperties, object object
core/search object
All of: stylesProperties, object object
core/separator object
All of: stylesProperties, object object
core/shortcode object
All of: stylesProperties, object object
core/site-logo object
All of: stylesProperties, object object
core/site-tagline object
All of: stylesProperties, object object
core/site-title object
All of: stylesProperties, object object
core/social-link object
All of: stylesProperties, object object
core/social-links object
All of: stylesProperties, object object
core/spacer object
All of: stylesProperties, object object
core/table object
All of: stylesProperties, object object
core/table-of-contents object
All of: stylesProperties, object object
core/tag-cloud object
All of: stylesProperties, object object
core/template-part object
All of: stylesProperties, object object
core/term-description object
All of: stylesProperties, object object
core/text-columns object
All of: stylesProperties, object object
core/verse object
All of: stylesProperties, object object
core/video object
All of: stylesProperties, object object
core/widget-area object
All of: stylesProperties, object object
core/legacy-widget object
All of: stylesProperties, object object
core/widget-group object
All of: stylesProperties, object object
stylesPropertiesAndElementsComplete object