Lego2012
12/13/2016 - 12:12 PM

Style the Visual Editor

Style the Visual Editor

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

<!-- 
You can style the visual editor. Simply create your new CSS file – something like editor-style.css and then include the following snippet in your functions 
-->

add_filter('mce_css', 'my_editor_style');
function my_editor_style($url) {

  if ( !empty($url) )
    $url .= ',';

  // Change the path here if using sub-directory
  $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css';

  return $url;
}