Archived topic
Gutenberg color palette only works in editor not live site
3 replies · Started by Sebastian on June 16, 2021
Hello,
I tried to change the color palette of the Gutenberg Editor and I used the code described here: https://generatepress.com/forums/topic/customizing-generateblocks-color-palette/#post-1200829
When I am working in the editor, everything looks fine with the new colors. However, as soon as I click preview or open the saved page the colors can't be seen. It works when I get back to choosing a custom color
Screenshots of problem with code: https://docs.google.com/document/d/1jdaFUkrB-kENq-3vfVvQJyFDmAxR_wvZ5d1BFnueUfI/edit?usp=sharing
Do you know what could be the issue here?
Any help appreciated, thank you and best regards
Hi Sebastian,
Please refer to this topic:
https://wordpress.org/support/topic/custom-editor-color-pallets-appear-in-edit-not-on-saved-front-end-posts/
The PHP snippet generates CSS class for the content, but there's no CSS for those classes.
So you'll also need to add CSS to your site in order to make the colors show on frontend.
Hope this helps :)
Hi Ying,
that helps a lot. Thank you very much :)
Best regards, Sebastian
Great! You are welcome :)