【发布时间】:2017-05-08 07:49:53
【问题描述】:
我正在尝试为我的 wordpress 主题的自定义页面模板创建一个简单的表单,但问题是我无法获得 tinymce 编辑器的工具栏。我已经搜索并找到了一些资源,但对我没有任何帮助。这是我的代码
<?php
$content = 'Start typing to create.';
$editor_id = 'ic_colmeta_editor';
$settings = array(
'wpautop' => true,
'media_buttons' => true,
'textarea_name' => $editor_id,
'textarea_rows' =>get_option('default_post_edit_rows', 10),
'tabindex' => '',
'editor_css' => '',
'editor_class' => '',
'teeny' => true,
'dfw' => true,
'tinymce' => true,
'quicktags' => true
);
wp_editor( $content, $editor_id, $settings); ?>
在function.php中
wp_enqueue_script( 'tinymce_js', includes_url( 'js/tinymce/' ) . 'wp-tinymce.php', array( 'jquery' ), false, true );
我还尝试通过添加 wp-config.php 来删除连接脚本
define('CONCATENATE_SCRIPTS', false);
但是结果总是和please view the image一样
工具栏不见了。那么问题来了,我该如何解决呢?
提前致谢。
【问题讨论】:
标签: php wordpress wordpress-theming