Site logo

[Support request] Button colours and font

Home Forums Support [Support request] Button colours and font

Home Forums Support Button colours and font

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2500609
    Helen

    Hi

    I have set my global colours via the Generate Press options in the Customiser. However, the button colour I have set does not show. The buttons I insert are showing the Default Generate Press colour. What have I done wrong?

    The font I have linked to locally, is also not rendering in the Gutenburg editor, although it is displaying fine when previewed. Is there anything I can do about this?

    Thanks,
    Helen

    #2500887
    Fernando
    Customer Support

    Hi Helen,

    I believe the Buttons you which to alter the colors of are GenerateBlocks buttons. To alter these, you’ll need to alter them from the Block settings. Reference: https://docs.generateblocks.com/article/buttons-overview/#colors

    #2501081
    Helen

    Shouldn’t I be able to set the colours of button globally in the customiser?

    #2501090
    Fernando
    Customer Support

    The one in the customizer works for WordPress-generated Buttons like the default “Read more” button.

    For GB Buttons, if you want global control over them, you’ll need GB Pro. You can then use Global Styles. Reference: https://docs.generateblocks.com/article/global-styles/#:~:text=Adding%20a%20Global%20Style,for%20this%20block%20by%20default.

    #2501169
    Helen

    Thanks, I do have GB Pro, so I will look at your reference doc.

    My second question was about font rendering. Do you have any idea why my font fails to render in the WordPress editor? I have installed Proxima Nova locally which is working on the front end, but is rendering as Times in the Editor making it difficult for me to see the typography design.

    Thanks,
    Helen

    #2501283
    David
    Staff
    Customer Support

    Hi there,

    you need to tell WP to load local fonts in the editor.

    You can use this PHP Snippet to load your Customizer > CSS in the editor:

    
    add_filter( 'block_editor_settings_all', function( $editor_settings ) {
        $css = wp_get_custom_css_post()->post_content;
        $editor_settings['styles'][] = array( 'css' => $css );
    
        return $editor_settings;
    } );

    How to Add PHP:
    https://docs.generatepress.com/article/adding-php/

    #2501287
    Helen

    Fantastic, that works a treat.

    Thank you both for your help.

    #2501370
    David
    Staff
    Customer Support

    Glad to hear that !

    #2502678
    Stefanie

    Hi there,

    I came across this thread because i was also wondering why the button formatting was not working. I’m using the free version of GB.

    I tried to create a global style for the GB buttons via CSS. But this works only conditionally. Strange thing is: all styles are taken over, just not the background color (accent-2 is a dark green):
    https://prnt.sc/sB2QsmN7KtfF

    mhmm…🤔

    #2502689
    David
    Staff
    Customer Support

    Hi there,

    try improving the specificity of the CSS selector eg.

    
    a.gb-button {
        /* your styles */  
    }
    #2502702
    Stefanie

    Hi,

    thanks for the quick reply!
    But this selector causes none of the formatting to work anymore:
    https://prnt.sc/gjqrHXvC77LD

    #2502755
    David
    Staff
    Customer Support

    Can you raise a new topic – where you can share a link to your site and i can take a look ?

    #2502851
    Stefanie

    Hi David,

    thank you for your support!
    I have found out now. This selector works:
    .gb-button-wrapper a.gb-button

    CSS is really weird sometimes 🙄

    https://prnt.sc/daLem8w4m122

    #2502857
    David
    Staff
    Customer Support

    Glad to hear that 🙂

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.