Answer the question
In order to leave comments, you need to log in
How to connect your styles to the WordPress editor?
You need to connect the styles of the site itself to the WordPress editor, so that when editing in visual mode, everything is displayed as it will be on the site. I found on the Internet (on wp-kama) that this can be done through the functions.php file, writing the following code there:
function my_theme_add_editor_styles() {
add_editor_style( 'styles.css' );
}
add_action( 'current_screen', 'my_theme_add_editor_styles' );
Answer the question
In order to leave comments, you need to log in
Where did you get the current_screen action from? Replace with: add_action( 'admin_init', 'my_theme_add_editor_styles' );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question