Can’t change the width of content in the visual editor

WordPress will not know that you want this css applied to the backend unless you load it properly. I believe your css will have loaded on the frontend of the site, but not the backend.

If you want it to load on the backend, you should use instead:

function i_want_a_cool_editor_style() {
add_editor_style( 'editor-style.css' );
}
add_action( 'admin_init', 'i_want_a_cool_editor_style' );

An alternative approach, if you only have a few styles to load, is to load the css directly on the functions.php (but again, using the right code to load it), eg.

add_action('admin_head', 'my_cool_stylin');

function my_cool_stylin() {
 echo '<style>
html .mceContentBody {
  max-width: none !important; }
</style>';
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)