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)
Viewing 1 replies (of 1 total)
The topic ‘Adding editor styles through plugin’ is closed to new replies.