Using WordPress 5.8, Astra theme, Toolset Types and Blocks, WordPress Block (Gutenberg) editor.
I am trying to: add a class in the (Gutenberg) Additional Classes area for various blocks while using Toolset to create and edit a WordPress Archive template for my new custom post type. I wanted to add a unique class to one or two of the blocks for my own styling purposes. I added a class to the initial paragraph on the page (using a standard gutenberg para block). I also (tried to) add a class to the Toolset Container block, and to the Archive Loop item block.
Link to a page where the issue can be seen: hidden link
I expected to see: (when looking at the source code behind the page) my unique class on the initial paragraph, the container, each archive loop item block.
Instead, I got: Only the standard gutenberg paragraph had my additional class. No extra classes appeared for the Toolset blocks.
When editing, the Advanced area with the Additional Classes field is available for all Toolset blocks (the Container block has a separate ID and Classes area). I can enter text in those fields but it is not saved and does not appear on the page.
I don't know if this applies only when creating templates (I think it applies to Content Templates too) or if it also applies to Toolset blocks in use directly within pages or posts. I can get around this and style my items another way. But I have wasted time on this, believing that the classes would be stored. If these fields aren't "really" available within the template area, it would be more helpful to hide them.
Hello,
After input the custom CSS class name, you need to press keyboard "Enter", then save it and test again.
See my screenshot css-class.JPG
Ah, I see, thank you.
A bit confusing though, since adding additional classes to native gutenberg blocks doesn't work this way. It never occurred to me to try it this way, because I am so used to doing things "the gutenberg way".
In my opinion, it would be better if Toolset behaved in the same way as native gutenberg, because otherwise it is very easy for users (like me!) to become confused. So I would still request a change. But it's not a bug, really, so I apologise for that!
Thanks for your help.
There isn't such kind of built-in feature within Toolset Blocks plugin, you can add a feature request here:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Currently, when you input the CSS class names, you need to separate them with commas, spaces, or the Enter key, see the notice in my screenshot:
https://toolset.com/wp-content/uploads/2021/07/2126149-css_class.jpg
My issue is resolved now. Thank you!
(I'm just suggesting that it be more in line with native blocks additional classes)