How to add css to wp_head depending on the user role?

Thanks to the help of two fellow members of this forum I have managed to get the snippet working. Here I leave the solution for any future answer seeker who happens to stop by. add_action( ‘wp_head’, function () { //Get current user ID, if the user is logged in. if ( is_user_logged_in() ) { $user_id … Read more

Dequeue classic-themes.min.css

Thanks to @t31os I achieved dequeuing the stylesheet with this code: function disable_classic_theme_styles() { wp_deregister_style(‘classic-theme-styles’); wp_dequeue_style(‘classic-theme-styles’); } add_filter(‘wp_enqueue_scripts’, ‘disable_classic_theme_styles’, 100);

How do I make my block-editor styles match my front-end styles?

Just use the add_editor_styles() function on the after_setup_theme() hook for your editor styles, and enqueue the same style sheet using wp_enqueue_style() on the wp_enqueue_scripts() hook. Optionally, you can also use wp_style_add_data() to inline the styles for better performance. There’s no need to manually add the .editor-styles-wrapper class before other selectors if you enqueue the style … Read more