• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Color settings get overriden

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Forum Bugs and Suggestions › Color settings get overriden

This topic is: not resolved

Tagged: color settings

  • This topic has 3 replies, 4 voices, and was last updated 10 months, 1 week ago by Daniel.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 31, 2021 at 9:35 am #502859
    Odyn
    Participant

    First time on this forum.
    I'm doing a webpage using Genesis Framework / Genesis Sample 3.3.4 as a basis.
    I've added a new color palette using a code snippet I found online:
    `function wpdc_add_custom_gutenberg_color_palette() {
    add_theme_support(
    'editor-color-palette',
    [
    [
    'name' => esc_html__( 'Rdeca', 'wpdc' ),
    'slug' => 'rdeca',
    'color' => '#ff421a',
    ],
    [
    'name' => esc_html__( 'Smetana', 'wpdc' ),
    'slug' => 'smetana',
    'color' => '#f8f7ef',
    ],
    [
    'name' => esc_html__( 'Crna', 'wpdc' ),
    'slug' => 'crna',
    'color' => '#020407',
    ],
    [
    'name' => esc_html__( 'Siva', 'wpdc' ),
    'slug' => 'siva',
    'color' => '#808090',
    ],

    ]
    );
    }
    add_action( 'after_setup_theme', 'wpdc_add_custom_gutenberg_color_palette' );`

    The problem is while these tags appear in the web source code, colors chosen here by the user are overriden by the ones in theme's style.css

    So for example if h1 is styled blue in style.css and I chose red in the block's color settings, text remains blue.

    Any suggestions?

    http://artkinomreza.si/wp21/
    February 1, 2021 at 3:45 pm #502871
    Anita
    Keymaster

    Take a look at this StudioPress post. It's missing some screenshots and I've made them aware of it, but you may find the solution in the text.


    Love coffee, chocolate and my Bella!

    January 10, 2022 at 3:59 am #504657
    webkompaan
    Participant

    Hi Anita, I'm having the same problem and don't know what to look for. I added the color palette before to sites that don't run a Genesis theme, but this time I'm using the Breakthrough theme and just can't add the new colors. They are stuck on the colors on the Customize page.

    I added this to the functions.php of the breakthrough theme:

    add_theme_support( 'editor-color-palette', array(
    array(
    'name' => __( 'Zwart', 'breakthrough-pro' ),
    'slug' => 'zwart',
    'color' => '#333',
    ),
    array(
    'name' => __( 'Wit', 'breakthrough-pro' ),
    'slug' => 'wit',
    'color' => '#fff',
    ),
    array(
    'name' => __( 'Rood', 'breakthrough-pro' ),
    'slug' => 'rood',
    'color' => '#ff0000',
    ),
    array(
    'name' => __( 'Donkerblauw', 'breakthrough-pro' ),
    'slug' => 'donkerblauw',
    'color' => '#07153A',
    ),
    array(
    'name' => __( 'Lichtblauw', 'breakthrough-pro' ),
    'slug' => 'lichtblauw',
    'color' => '#00A5ff',
    )
    ) );

    March 23, 2022 at 11:17 am #504882
    Daniel
    Participant

    Thanks it helped me.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble