用于撰写和编辑帖子的文本区域不能很好地处理图像布局。
插入的图像似乎与文本区域的左边缘或前一图像的右边缘对齐。这通常很难处理,用户必须明白,这不是他们发布后的表现方式。
I\'m after a better-looking, and more usable layout.
我希望能够始终使非浮动图像左对齐并堆叠在另一个图像上。这是通过修改管理css来解决的,还是通过另一种方式来实现文本区域中图像的格式化?
用于撰写和编辑帖子的文本区域不能很好地处理图像布局。
插入的图像似乎与文本区域的左边缘或前一图像的右边缘对齐。这通常很难处理,用户必须明白,这不是他们发布后的表现方式。
I\'m after a better-looking, and more usable layout.
我希望能够始终使非浮动图像左对齐并堆叠在另一个图像上。这是通过修改管理css来解决的,还是通过另一种方式来实现文本区域中图像的格式化?
将此添加到主题functions.php
文件:
add_editor_style();
editor-style.css
它位于主题的根目录中。这些函数接受文件名或文件名数组作为参数。法典中的参考:http://codex.wordpress.org/Function_Reference/add_editor_style如果您想要(或需要)对自定义CSS文件名和位置进行更多控制,可以使用此功能:
function custom_editor_style($url) {
if ( !empty($url) )
$url .= \',\';
// Change the path here if using sub-directory
$url .= trailingslashit( get_stylesheet_directory_uri() ) . \'editor-style.css\';
return $url;
}
add_filter(\'mce_css\', \'custom_editor_style\');
通常,在创建某种形式的查询时,我会对参数使用一个数组,如下所示: $postslistArgs = array( \'child_of\' => 320, \'parent\' => 320 ); $postslist = get_pages($postslistArgs);但是,在其他情况下,我还需要/想要使用URI样式的查询参数,如下所示:get_pages(\'child_of=