我用的是一个214岁的孩子this site (虽然我不确定所使用的主题是否与本例相关)。
视觉编辑器的内容由以下样式规则设置:
html .mceContentBody {
font-size: 100%;
max-width: 474px;
}
我遵循了这个问题的答案:"Why is the visual editor in WordPress limiting the width by wrapping the content?" 并将此代码放入我的自定义编辑器样式表中:html .mceContentBody {
max-width: none !important; }
我很肯定我正确地将自定义编辑器样式表排队(我在style.css工作中所做的更改)。下面是我的子函数。php文件:<?php
function RegisterCustomScriptsStyles(){
// Register and enqueue custom stylesheets
// Register custom stylesheets to the path to the theme\'s stylesheets
wp_register_style( \'customStylesheet\', get_template_directory_uri() . \'/style.css\');
wp_register_style( \'customEditorStylesheet\', get_template_directory_uri() . \'/editor-style.css\');
// Enqueue the stylesheets
wp_enqueue_style( \'customStylesheet\' );
wp_enqueue_style( \'customEditorStylesheet\' );
// Register and enqueue custom scripts
// Register custom scripts to the path to the theme\'s scripts
//wp_register_script( \'customScript\', get_stylesheet_directory_uri() . \'/customScript.js\', array(\'jquery\') );
//wp_enqueue_script( \'customScript\' );
}
add_action(\'wp_enqueue_scripts\', \'RegisterCustomScriptsStyles\');
那么我错过了什么/做错了什么?