/ Published in: PHP
If you are creating a custom post type in Wordpress, and turn off the 'editor' capability, then TinyMCE is not loaded. This means any WYSIWYG meta box textareas will fail. Add this snippet to your theme's functions.php file to load the required TinyMCE JS and styles.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Ensure TinyMCE is loaded. * Required to use TinyMCE in meta boxes. */ add_action("admin_head","myplugin_load_tiny_mce"); function myplugin_load_tiny_mce() { wp_tiny_mce( false ); // true gives you a stripped down version of the editor }