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 (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Styles not displayed in Editor

  • Hi,

    i use this code to display my CSS-codes in the editor:

    // Load CSS Variables in Editor
    add_filter('block_editor_settings_all', function($editor_settings) {
        $style_path = get_stylesheet_directory() . '/style.css';
        if (file_exists($style_path)) {
            $css_style = file_get_contents($style_path);
            $editor_settings['styles'][] = ['css' => $css_style];
        $customizer_css = wp_get_custom_css_post();
        if (isset($customizer_css->post_content)) {
            $css_customizer = $customizer_css->post_content;
            $editor_settings['styles'][] = ['css' => $css_customizer];
        return $editor_settings;

    But all my buttons that I have loaded from a staging environment via the WordPress importer are displayed in the frontend, but not in the WP editor.

  • Forgot to upload the function.php. ๐Ÿ˜ถ๐Ÿ˜…

    Ticket closed

  • Great to hear that ๐Ÿ™‚

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