将此添加到您的函数中。php
function wp_tiny_mce_sanitize_fix( $init )
{
$init[\'extended_valid_elements\'] = \'div[*], article[*], span[*], p[*]\';
$init[\'remove_linebreaks\'] = false;
$init[\'convert_newlines_to_brs\'] = true;
$init[\'remove_redundant_brs\'] = false;
return $init;
}
add_filter( \'tiny_mce_before_init\', \'wp_tiny_mce_sanitize_fix\' );