• Has anyone had any luck getting add_editor_style to work in WP 4.1.5 or later? It isn’t working for me.

    Here’s the code I placed in my theme’s functions.php file:

    add_action(‘init’, ‘mytheme_add_editor_styles’ );

    function mytheme_add_editor_styles() {
    add_editor_style(‘editor-style.css’);
    }

    I put the editor-style.css file in the root directory of my theme. The css file does not load in the head of the document.

Viewing 1 replies (of 1 total)
  • Thread Starter webcomm

    (@webcomm)

    Actually, I’ve realized the code works. I just didn’t think it was working, because the editor-styles.css is not referenced in the head in the usual way, but instead appears only in the tinyMCEPreInit settings.

    This is all that’s needed:

    add_editor_style('editor-style.css');

    Along with the editor-style.css file itself.

Viewing 1 replies (of 1 total)
  • The topic ‘add_editor_style not working’ is closed to new replies.