Gutenberg Blocks not appearing correctly within admin and frontend Part 2

Continuation of Gutenberg Blocks not appearing correctly within admin and frontend

The developer finally got back to me and they said:

The plugin uses wp_add_inline_style function to add the inline styles.

Please let me know if this can be fixed.

Hello Daniel,

Please note that this is a third-party plugin issue. We recommend contacting the plugin author to ensure full compatibility with the X/Pro theme. We do not offer support or custom development for third-party plugins, as it falls outside our scope. For customization help, hire a developer or subscribe to One, where such questions are addressed.

Thanks for understanding

Perfect! So you made me reach out to the developer just to tell me you can’t help. How do I go about designing the admin pages? What plugin would you recommend?

Hey Daniel,

We did not guarantee a fix for this issue.

I’m not sure what Ultimate Dashboard does but check out our video about creating a custom dashboard here https://youtu.be/lEBeQpQOLDE?si=mZm-oIIzM2hJZQG0

Anyway, the fix should be in the Ultimate Dashboard’s side. Ultimate Dashboards should register its own style handle and attach inline CSS to that:

wp_register_style( 'ultimate-dashboards-inline', false ); // virtual handle
wp_enqueue_style( 'ultimate-dashboards-inline' );
wp_add_inline_style( 'ultimate-dashboards-inline', $css );

This makes the inline CSS self-sufficient and not dependent on whether Pro (or any other theme) keeps global-styles alive.

Alternatively, if you want to maintain compatibility without touching the plugin, you can re-register the global-styles handle yourself in a must-use plugin or child theme after Pro removes it:

add_action( 'wp_enqueue_scripts', function() {
    if ( ! wp_style_is( 'global-styles', 'registered' ) ) {
        wp_register_style( 'global-styles', false );
        wp_enqueue_style( 'global-styles' );
    }
}, 11 );

Note that all that is beyond the scope of our support. Please ask for help from Ultimate Dashboard or consult with a developer to make Ultimate Dashboard work when Pro is active.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.