Skip to content
scribu edited this page May 9, 2011 · 4 revisions

Sometimes, text widgets are simply not the best solution. Enter editable_option():

<?php editable_option( array(
  'key' => 'favorite_color',
  'type' => 'textarea',
  'default' => 'green'
) ); ?>

'key' is the name of the option

'type' is the type of interface you want to be editing it with. Other possible values for type: 'input', 'checkbox', 'select', 'textarea' or 'rich'.

'default' is the default value of the option.