- This topic has 26 replies, 8 voices, and was last updated 2 years, 9 months ago by Tom.
-
AuthorPosts
-
September 6, 2020 at 1:54 pm #1433186Philip
Hello
Sorry to renew the topic, but i need help with same colors in Gutenberg blocks, i wanted to add my own colors and used the provided code by Tom plus additional ones i created, they work on back end but do not apply in the front end when the post is published same thing happen if i edit an old post and select from my new colors, they don’t apply on front end when post is updated, just black text and no color.
What can be the problem?
Thank you.September 7, 2020 at 12:48 am #1433534DavidStaffCustomer SupportHi there,
can you start a new topic and share a link to a page where the problem is.
October 12, 2020 at 5:41 am #1484648DavidThe code you gave replaces the colour palette. Could you provide to code to just add colours to the palette, leaving the previous colours there?
add_action( 'after_setup_theme', function() { add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Blue' ), 'slug' => 'blue', 'color' => '#59BACC', ), array( 'name' => __( 'Green' ), 'slug' => 'green', 'color' => '#58AD69', ), array( 'name' => __( 'Orange' ), 'slug' => 'orange', 'color' => '#FFBC49', ), array( 'name' => __( 'Red' ), 'slug' => 'red', 'color' => '#E2574C', ), ) ); } );
October 12, 2020 at 9:24 am #1485188LeoStaffCustomer SupportI don’t believe so. You’d need to add the original colors along with the new colors in the code.
February 13, 2021 at 3:07 am #1656691RachelHi,
what a great thread. Thanks so much for this.
Is there a code which I can add transparency to the Generatepress customiser? Thanks.
Sorry, all fine the slider is there
February 13, 2021 at 12:06 pm #1657226LeoStaffCustomer SupportGlad you found it π
May 4, 2021 at 1:26 am #1763172SaschaWhen adding to code snippets or child themes functions.php, the color-palette in Customizer remains unchanged π
May 4, 2021 at 4:13 am #1763389DavidStaffCustomer SupportHi there,
for the Customizer Colors you need to use the snippet provided here:
https://docs.generatepress.com/article/generate_default_color_palettes/
July 2, 2021 at 2:41 pm #1842679WilliamAloha π
The GenerateBlocks Color Palette code works great to color GenerateBlocks (containers, headlines).
But it seems to kill the ability to color a non-GenerateBlocks stuff, for example, a WP Paragraph block.
I’d rather not have to convert all my WP Paragraph blocks to GB Headlines (paragraph) .. what a chore.
Can the code be adjusted to apply to items outside the GB-sphere?
Oddly enough … I can color (with code above) a WP Paragraph block in editing mode … but doesn’t show up live.
https://jumpshare.com/v/21IVBsgJfxmr2ldbLz3I
Happy Friday!
π
July 3, 2021 at 8:27 pm #1843634TomLead DeveloperLead DeveloperHi there,
Core blocks use the class system to style themselves (GB uses dynamic CSS). So, you’ll need to add those classes to the your site stylesheet. For example:
.has-myred-color { color: red; }
Hope this helps!
July 3, 2021 at 11:42 pm #1843693WilliamI would NEVER have figured that out!
You are indeed the best π
Mahalo to all at GP!
Bill
July 4, 2021 at 7:25 pm #1844527TomLead DeveloperLead DeveloperGlad I could help! π
-
AuthorPosts
- You must be logged in to reply to this topic.