Questions tagged [theme.json]
The theme.json tag has no usage guidance.
27 questions
0
votes
0
answers
79
views
Style priority in theme.json
I have the following theme.json file in a custom classic/hybrid theme:
theme.json file:
"styles": {
"elements": {
"heading": {
"color": {...
0
votes
0
answers
33
views
Adding features to Gutenberg without theme.json
I am using a non-block theme for my website and am using Gutenberg for writing posts. I want to extend Gutenberg's functionality by adding the image lightbox feature. So I added a theme.json file to ...
2
votes
1
answer
366
views
Override base Gutenberg block default spacing in child theme's theme.json
I am trying to change the default top spacing (margin) for the Embed block used in Gutenberg. I noticed that for some reason, the default setting is
.wp-block-embed {
margin: 0 0 1em;
}
which ...
0
votes
0
answers
158
views
Gutenberg - Shadow settings not available (theme.json)
I registered shadows in my theme.json, but the setting options to add the shadows to Blocks doesn't show in the Gutenberg Editor. Only the presets are available as variables in my source code. I have ...
0
votes
2
answers
285
views
Add fontFamily object to theme.json
I have an FSE-related question
I'm trying to add a font to the 2023 theme but it's not showing in Gutenberg editor.
In theme.json, in the "settings.typography.fontFamilies" section, I added ...
2
votes
1
answer
388
views
Set a default overlay color for the Core Cover block in theme.json
I would like to know if it is possible to set a default Overlay color for the Core Cover block using theme.json, so that when a new Cover block is added, that Overlay color is pre-set rather than ...
3
votes
1
answer
1k
views
Responsive rules with block themes and theme.json
I’m learning about block themes for the first time and I’m not clear on how responsive layouts are achieved.
For example, let’s say I want a paragraph to use red font when screen width is less than or ...
0
votes
1
answer
435
views
Theme.json: styles.typography.FontFamily renders as default font in front end but not editor
The following theme.json settings work as expected on the front end: var(--wp--preset--font-family--greyclif) is defined for the "font-family" in the main styles in the body{} tag, and any ...
1
vote
1
answer
188
views
Problem with spacing sizes in theme.json
I often use the following code in theme.json to define predefined spacing:
"spacingScale": {
"steps": 5
},
"spacingSizes": [
{
"size": "min(...
1
vote
1
answer
297
views
Unload templates; disable parent Template Parts using only "theme.json"
I'm currently creating a child theme in WordPress and I'm having trouble with template parts and custom templates from parent theme. In particular, I want to disable some of the template parts ...
1
vote
0
answers
91
views
Theme.json_ Set default columns for gallery
I want to set a default number of columns for the gallery block within the theme.json-file. Is that possible? I couldn't find anything regarding this.
I tried some things under settings
"blocks&...
1
vote
1
answer
207
views
theme.json is altering Group block HTML
I am creating Blog within the existing site which will have completely different look, styles, features and functionalities.
I need theme.json only on the Blog pages, but the problem is that theme....
1
vote
2
answers
1k
views
Is there a way to add background-image to theme.json?
I thought the following would work, but it doesn't. I can't find a firm confirmation if Gutenberg allows the following:
"styles": {
"color": {
"backgroundImage": "...
3
votes
1
answer
1k
views
Where are the full site settings stored?
When making changes in the full site editor, where are the settings actually stored?
When searching for this I get a gazillion results saying the settings are stored in theme.json, but this can't be ...
0
votes
1
answer
105
views
How to add color icons to front of custom block color palettes
To understand what I am asking, if you look at my attachment...
...you will see towards the far right, that both the text and background words, have empty circles with a line going across them. I ...
1
vote
1
answer
571
views
theme.json should be in the child theme folder when using xxxx.json style located in the styles folder?
I'm making a child theme of TT3.
I'm using a json style in my child theme located in a styles named folder.
Do I have to have a copy of TT3 theme.json in my child theme ?
3
votes
0
answers
136
views
How can I disable fontSizes of the Paragraph block inside the Quote block with theme.json?
I'm using theme.json.
I'm specifying fontSizes for the Paragraph block as well as the Quote block in theme.json:
"settings": {
"blocks": {
"core/paragraph": {
...
2
votes
1
answer
379
views
How to automatically reload style variant .json?
New block editor themes like twentytwentythree allow style variations. You can change colors and fonts from the site editor. A style variation is just a .json file that gets merged with theme.json.
My ...
2
votes
2
answers
2k
views
How to set the background color of a template part (Header/Footer) in Twenty Twentythree?
In Wordpress's shiny new Twenty Twentythree theme, how can you assign a background color to the header or foother template parts?
Can this be done in a child theme - through theme.json? Or somehow ...
1
vote
0
answers
199
views
Setting colors in theme.json changes default font size and family in backend
I have a basic theme.json with an array or colors that creates a working colour palette.
The text in the backend page I am editing is set to 'default' but when I use the theme.json it goes from sans ...
0
votes
1
answer
90
views
Narrow paragraph block aligned to left of "wrapper"
I'm using the full-site-editing feature with
"layout":{
"contentSize":"1264px",
"wideSize":"1264px"
}
set in theme.json. Now when I ...
3
votes
1
answer
901
views
Theme.json: creating different sections of the color palette
I've got some colors defined in theme.json- is there a way to define custom sections within the color palette? When I set my own colors, they show up in the section labeled "Theme". The ...
2
votes
1
answer
172
views
Is it possible to nest block styles in the theme.json
In the theme.json file I can set styles for the core/verse block.
My designs dictate that if the editor were to nest the core/verse block inside of a core/cover block, some styles should be different ...
2
votes
1
answer
1k
views
Setting font sizes in theme.json
Just diving into setting some styles with theme.json. I'm having trouble getting my preferred font sizes to show up in the editor. Here's the code:
{
"version": 2,
"settings&...
2
votes
1
answer
1k
views
Does theme.json get cached? How can I clear it?
I set up a theme with a theme.json file and now I want to make some changes to it. I cannot get my changes to take... I am working in a local environment.
I am guessing its a caching problem but I ...
1
vote
0
answers
205
views
How can I add a color picker to a custom Gutenberg block which includes the default system palette from theme.json?
Do I need to use the ColorGradientControl component to add this interface to a custom block, even if gradients are deactivated by theme.json?
5
votes
1
answer
2k
views
Once Again: How to Remove Option from Gutenberg Editor for Specific Block in theme.json
Since WP 5.8 we can define various settings in the theme.json which is much appreciated and really helpful. But there are still some options I cannot find, e.g. how can I remove the layout panel from ...