Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Setting Rows on New wp_editor() WordPress

  • SOLVED

Ok, I'm trying to set the number of rows using the new wp_editor().

If I use this code it works, but it pulls from the settings, which I DON'T want...


$settings = array( 'textarea_rows' => get_settings('default_post_edit_rows', 10) );
wp_editor( $meta ? $meta : $field['std'], $field['id'], $settings = array() );


I've tried changing 10 to 5 and that didn't work.

I've tried this... but it didn't work either.


$settings = array( 'textarea_rows' => '5' );
wp_editor( $meta ? $meta : $field['std'], $field['id'], $settings = array() );


Any ideas?

Answers (2)

2011-11-30

Julio Potier answers:

Hello

try this :
$settings

instead os this :
$settings = array()

Example :
$settings = array( 'textarea_rows' => '5' );
wp_editor( $meta ? $meta : $field['std'], $field['id'], $settings );


See you


Armand Morin comments:

That worked.

2011-11-30

Romel Apuya answers:

remove the array() on the parameter $settings();

wp_editor( $meta ? $meta : $field['std'], $field['id'], $settings);