- This topic has 13 replies, 4 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
January 18, 2023 at 11:00 am #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,
HelenJanuary 18, 2023 at 6:20 pm #2500887Fernando 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
January 18, 2023 at 11:46 pm #2501081Helen
Shouldn’t I be able to set the colours of button globally in the customiser?
January 18, 2023 at 11:53 pm #2501090Fernando 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.
January 19, 2023 at 1:55 am #2501169Helen
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,
HelenJanuary 19, 2023 at 4:01 am #2501283David
StaffCustomer SupportHi 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/January 19, 2023 at 4:04 am #2501287Helen
Fantastic, that works a treat.
Thank you both for your help.
January 19, 2023 at 4:59 am #2501370David
StaffCustomer SupportGlad to hear that !
January 20, 2023 at 4:21 am #2502678Stefanie
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/sB2QsmN7KtfFmhmm…🤔
January 20, 2023 at 4:28 am #2502689David
StaffCustomer SupportHi there,
try improving the specificity of the CSS selector eg.
a.gb-button { /* your styles */ }January 20, 2023 at 4:33 am #2502702Stefanie
Hi,
thanks for the quick reply!
But this selector causes none of the formatting to work anymore:
https://prnt.sc/gjqrHXvC77LDJanuary 20, 2023 at 5:20 am #2502755David
StaffCustomer SupportCan you raise a new topic – where you can share a link to your site and i can take a look ?
January 20, 2023 at 6:45 am #2502851Stefanie
Hi David,
thank you for your support!
I have found out now. This selector works:
.gb-button-wrapper a.gb-buttonCSS is really weird sometimes 🙄
January 20, 2023 at 6:47 am #2502857David
StaffCustomer SupportGlad to hear that 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.