I am relatively new to buiding websites, this is a side gig for a client.
I have used the theme 2024, i want to reduce the spacing to say 5: height:var(–wp–preset–spacing–50)
But I don’t know how to do this; this applies to all the pages within the website, it’s part of the 2024 theme and a sort of global variable? Any suggestions would be greatly appreciated:
[ link deleted, use the link field next time ] link to the website.
Thanks!
The page I need help with: [log in to see the link]
Oh alignfull is alignment class that wordpress adds when you choose full width for a block in the editor, and for the rem option it’s just alternative, you can use it like this
But I don’t know how to do this; this applies to all the pages within the website, it’s part of the 2024 theme and a sort of global variable? Any suggestions would be greatly appreciated:
Just a quick FYI:
While you can surely make this (and similar) change via custom CSS override, you don’t have to. Because the Twenty Twenty-Four theme is a block theme supporting full-site editing, you can easily alter the appearance of the theme and your site visually using the same block editor you use to create your posts.
For the task at hand, it seems the spacer is in the default “Pages” template used to render Pages (as opposed to Posts or anything else). You can find and easily adjust this spacer in Appearance -> Editor -> Templates -> Pages without any custom CSS, as depicted in the image below (click to view a larger and clearer image).
And even if you prefer to use custom CSS, I wouldn’t recommend the shotgun approach of adding !important to override a core WordPress class like wp-block-spacer as this sets the height to zero everywhere the spacer is used and can have unintended consequenses. It’s better to use a more targeted selector to limit the scope!
George, your response makes sense, the theme itself dictates the spacing, i did try altering the header to no avail and did not realise it’s the page layout i needed to play around with.
Thank you very much for this enlightning response, just what i needed without messing around with the custom CSS which can get messy down the line if I forget about it i would say.
Thanks, have a great week both!!
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Edit 2024 Theme Block Spacer’ is closed to new replies.