Modifying posts based on category in TwentyTwentyTwo theme

I managed to solve my problem. So, the posts are using a single.html template file (in the TwenytTwentyTwo theme: /templates/single.html). I wanted to target a category class in the <body> element of the single.html. To make that happen, I had to modify the single.html file in my Child theme by adding the following code snippet … Read more

How to remove class=”wp-block-heading” from Heading tags?

you can remove the class=”wp-block-heading” attribute from your heading tags by modifying your theme’s functions.php file or by using a plugin. Option: Modify functions.php Go to Appearance > Theme Editor in your WordPress dashboard. Click on the functions.php file on the right-hand side. Add the following code at the end of the file: function remove_block_css(){ … Read more

Wrap post titles containing slashes on narrow viewports

I have not found a way to specify that a slash should be treated like a hyphen. One potential workaround is to add the style overflow-wrap: break-word;. This will allow long words to break without affecting the breaking of other words. But it will just break at whatever character would cause overflow, it doesn’t prefer … Read more

How to add arbitrary custom CSS to a WordPress Block Theme using Site Editor?

In WordPress 6.1.1 (released 2022-11) this is not possible in the UI. But good news: In WordPress 6.2 (to be released somewhen March 2023) this will be possible! Was introduced as an experimental feature in Gutenberg 14.8 from 2022-12 (see video ) It works like this: WordPress Dashboard > Appearance > Editor Open the Styles … Read more