• Hi,

    I’m trying to add a textarea with a WYSIWYG editor as a meta box. I read the documentation and apparently setting the metabox type to “textarea” should already render a WYSIWYG editor, but that’s not the case for me. I get a simple textarea instead.

    Can someone let me know what am I missing? I’m sure I must be missing something since this is a basic feature.

    Thanks!

    Here’s my code for the metabox:

    add_action( 'admin_init', 'lu_portfolio_meta_boxes' );
    
    function lu_portfolio_meta_boxes() {
      $lu_portfolio_description = array(
        'id'        => 'lu_portfolio_description',
        'title'     => __('Work Description', 'lumen'),
        'desc'      => __('Write a description for this work. Leave this field empty if you don\'t want to show the description area.', 'lumen'),
        'pages'     => array( 'portfolio' ),
        'context'   => 'normal',
        'priority'  => 'default',
        'fields'    => array(
          array(
            'id'          => 'lu_portfolio_description',
            'label'       => 'Work Description',
            'type'        => 'textarea'
          )
        )
      );
      ot_register_meta_box( $lu_portfolio_description );
    }

    http://ww.wp.xz.cn/extend/plugins/option-tree/

The topic ‘textarea type not working as expected’ is closed to new replies.