Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Possible conflict with BuddyBoss Theme: Editor Styles lost

  • Hi there,

    I hope you’re having a good day!

    After having built a couple of sites with the unmatched GP+GB combo, I find myself in a new situation.
    I am now building a site with the BuddyBoss Platform plugin and the accompanying BuddyBoss Theme, but I wouldn’t want to miss the GB functionality in this project. (I quickly tried to work with core blocks only, but that’s no fun! 😉

    But something odd happened: After activating the GB plugins on my otherwise pretty bare bones WP installation, the content in the Block Editor does not have any more theme styling to it. Most notably, the custom local fonts I added through the BuddyBoss theme interface are gone in the Editor interface, and a fallback serif system font is used instead. When I deactivate the GB plugins, the styles return. Note: In the frontend, content styling stays intact throughout. So, this is only a matter of the styles shown within the editor.

    I am well aware that I can style the content in the editor with a custom “editor-styles.css” file. But I am curious: What do the GB plugins change about the theme styles in the editor, and why is that? Or am I missing something here?

    I would appreciate if you could shed some light here!

    Cheers

    Alex

  • Hi there,

    could you try adding this PHP snippet to the site:

    
    remove_filter( 'block_editor_settings_all', 'generateblocks_do_block_css_reset', 15 );
    

    Let me know if it resolves the issue.

  • Hi David,

    thank you for the fast reply!

    I added the PHP snippet to the site (I tried both through the function.php of my child theme and a custom plugin), but it did not help.

    Would you have another suggestion?

    Cheers

    Alex

  • Hmmm… what happens if you disable GenerateBlocks.
    And add this snippet to the site:

    
    add_filter( 'block_editor_settings_all', 'custom_editor_styles', 15 );
    
    // Function to apply CSS reset
    function custom_editor_styles( $editor_settings ) {
        $css = 'p {margin-bottom: 100px}';
    
        // Add CSS to editor settings
        $editor_settings['styles'][] = array(
            'css' => $css,
        );
    
        return $editor_settings;
    }
    

    Do the editor styles remain intact ?

    FYI : We’re trying to ascertain whether its the changes that core made in 6.5 to the block_editor_settings_all filter.

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