请任何人帮忙好吗?我创建了自定义元框,其中两个位于textarea中。这就是我所拥有的:
array(
\'label\'=> \'Ingredients\',
\'desc\' => \'List of ingrediends\',
\'id\' => $prefix.\'ingrediends\',
\'type\' => \'textarea\'
),
array(
\'label\'=> \'Directions\',
\'desc\' => \'Directions\',
\'id\' => $prefix.\'directions\',
\'type\' => \'textarea\'
)
==========================
case \'textarea\':
echo \'<textarea name="\'.$field[\'id\'].\'" id="\'.$field[\'id\'].\'" cols="60" rows="4">\'.$meta.\'</textarea>
<br /><span class="description">\'.$field[\'desc\'].\'</span>\';
break;
如何添加wp\\U编辑器?我试过:
wp_editor( $content, \'recipe_directions\', array( \'textarea_name\' => \'recipe_directions\', \'media_buttons\' => false, \'tinymce\' => array() ) );
但它不工作,仍然显示正常领域。有人能帮忙吗。整个想法是创建类似于富文本编辑器的常规textarea
谢谢你的帮助。。。。任何人:)