Guest User

Wp Editor on Metabox - attempt 4

a guest
Oct 8th, 2013
239
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. // for pages use 'edit_page_form' as the first parameter. And see my comment below.
  3. add_action( 'edit_form_advanced', 'my_meta_editor' );
  4. function my_meta_editor() {
  5. // set 'your_meta_key' to the actual key
  6.  
  7. $content = get_post_meta($post->ID, 'att_meta_bio', true);
  8. // only low case [a-z], no hyphens and underscores
  9.  
  10. $editor = 'mymetaeditor';
  11. // See my comment below
  12.  
  13. $editor_settings = array(); wp_editor( $content, $editor, $editor_settings); }
RAW Paste Data