• 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

Genesis Sample Child Theme Gutenberg functions

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 › Archived Forums › Design Tips and Tricks › Genesis Sample Child Theme Gutenberg functions

This topic is: not resolved
  • This topic has 9 replies, 2 voices, and was last updated 6 years, 3 months ago by Victor Font.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • March 21, 2019 at 6:21 am #490176
    Andreas Beer
    Member

    I'm tweaking Genesis Sample Child theme and I'm wondering why these lines in functions.php don't have an effect.

    // -- Disable custom font sizes
    add_theme_support( 'disable-custom-font-sizes' );
    
    // -- Disable Custom Colors
    add_theme_support( 'disable-custom-colors' );
    March 21, 2019 at 7:41 am #490178
    Victor Font
    Moderator

    It's all in the timing. If you're adding those lines directly to functions PHP, they won't work. You have to hook them into the after_setup_theme action:

    function disable_gutenberg_custom_fonts_and_colors() {
    	add_theme_support( 'disable-custom-font-sizes' );
    	add_theme_support( 'disable-custom-colors' );
    }
    add_action( 'after_setup_theme', 'disable_gutenberg_custom_fonts_and_colors' );

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 21, 2019 at 7:54 am #490180
    Andreas Beer
    Member

    Hm, that's a new idea. Not yet working, but maybe that's because I have 3 'after_setup_theme' occurences in my functions.php. Should I make try this kind of thing?add_action( 'after_setup_theme' (array (...

    March 21, 2019 at 8:53 am #490184
    Andreas Beer
    Member

    Anyway, color palette and font size picker still showing up in full glory. Even with an array setting all sizes to 16 or an empty array that thing is still showing up. Where does that bad idea sneak in?

    March 21, 2019 at 11:01 pm #490191
    Victor Font
    Moderator

    I just tried the code on Genesis Sample in my dev environment and it's working exactly as it should. The Sample theme also has it's own color pallet that is not affected by the code.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 22, 2019 at 3:17 am #490194
    Andreas Beer
    Member

    That would be version 2.9 of the sample theme. I've started working with 2.8. Seems I have to start all over. Thanks anyway, Victor.

    March 22, 2019 at 7:40 am #490201
    Andreas Beer
    Member

    Ok, I switched to latest child theme version.
    But

    function disable_gutenberg_custom_fonts_and_colors() {
    	add_theme_support( 'disable-custom-font-sizes' );
    	add_theme_support( 'disable-custom-colors' );
    }
    add_action( 'after_setup_theme', 'disable_gutenberg_custom_fonts_and_colors' );
    

    is still not having any effect.

    March 23, 2019 at 8:07 am #490224
    Victor Font
    Moderator

    I'm working with V. 2.8 of the sample theme. I never said I was working with 2.9.

    The code doesn't do much anyway. Removing the custom colors removes the multi-color button. It does not remove the custom colors defined in the theme.

    The custom font sizes removes the numeric selector where you choose a specific pixel size. It does not remove the font selector drop down with the named sizes.

    What did you want to happen?


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 25, 2019 at 1:50 am #490252
    Andreas Beer
    Member

    Actually, I'm striving to get these options out completely, along with several others, as they are giving users a weird idea about the flexibility of our corporate design.

    March 25, 2019 at 8:07 am #490264
    Victor Font
    Moderator

    The Sample theme adds it's own color palette. If you want to totally remove everything, you have to remove both the theme's customizations and the Gutenberg defaults.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 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