Title: Adding editor styles through plugin
Last modified: August 22, 2016

---

# Adding editor styles through plugin

 *  [Shmoo](https://wordpress.org/support/users/macpresss/)
 * (@macpresss)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/adding-editor-styles-through-plugin/)
 * Both solutions don’t work for some reason, they give me a 404 file not found 
   while the path to the file is 300% correct.
 * This is just copy/paste from the WordPress Codex and all I want to do is simply
   add some editor styles to my theme through a plugin.
    Yes I tried those functions
   one by one not both at the same time.
 *     ```
       function my_editor_styles() {
   
       	$editor_styles = plugins_url( '/assets/css/editor_styles.css', __FILE__ );
   
       	add_editor_style( $editor_styles );
   
       }
       add_action( 'after_setup_theme', 'my_editor_styles' );
       ```
   
 *     ```
       // add extra editor CSS styles
       function my_editor_styles( $mce_css ) {
   
       	if ( ! empty( $mce_css ) )
   
       		$mce_css .= ',';
   
       	$mce_css .= plugins_url( '/assets/css/editor_styles.css', __FILE__ );
   
       	return $mce_css;
   
       }
       add_filter( 'mce_css', 'my_editor_styles' );
       ```
   

Viewing 1 replies (of 1 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [11 years, 7 months ago](https://wordpress.org/support/topic/adding-editor-styles-through-plugin/#post-5571613)
 * `$editor_styles = plugins_url( '/assets/css/editor_styles.css', __FILE__ );`
 * That means the code for your style is going to be found here: `example.com/wp-
   content/plugins/yourplugin/assets/css/editor_styles.css`
 * Is that where you put it?

Viewing 1 replies (of 1 total)

The topic ‘Adding editor styles through plugin’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/adding-editor-styles-through-plugin/#post-5571613)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
