Site logo

Archived topic

Button colours and font

13 replies · Started by Helen on January 18, 2023

Viewing posts 1–14 of 14

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

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

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

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/

Fantastic, that works a treat.

Thank you both for your help.

Glad to hear that !

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...🤔

Hi there,

try improving the specificity of the CSS selector eg.


a.gb-button {
    /* your styles */  
}

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

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

Glad to hear that :)

This archived topic is closed to new replies.