1) Tente alguns plugins diferentes que desativam a formatação e impeçam a remoção de parágrafos extras e espaços em branco do WP: enlace
2) Você pode enganar o WP para adicionar uma quebra de parágrafo usando <b> <b/>
no editor de html. É um espaço sem quebra nas tags <b>
. Você não poderá vê-lo no editor visual, então adicione-o no editor htnl. É feio, mas funciona sem a necessidade de desativar totalmente a formatação.
3) Você também pode fazer isso em functions.php e depois quebrar o texto que você não deseja que seja formatado com as tags <!-- noformat on -->
e <!-- noformat off -->
.
function newautop($text)
{
$newtext = "";
$pos = 0;
$tags = array('<!-- noformat on -->', '<!-- noformat off -->');
$status = 0;
while (!(($newpos = strpos($text, $tags[$status], $pos)) === FALSE))
{
$sub = substr($text, $pos, $newpos-$pos);
if ($status)
$newtext .= $sub;
else
$newtext .= convert_chars(wptexturize(wpautop($sub))); //Apply both functions (faster)
$pos = $newpos+strlen($tags[$status]);
$status = $status?0:1;
}
$sub = substr($text, $pos, strlen($text)-$pos);
if ($status)
$newtext .= $sub;
else
$newtext .= convert_chars(wptexturize(wpautop($sub))); //Apply both functions (faster)
//To remove the tags
$newtext = str_replace($tags[0], "", $newtext);
$newtext = str_replace($tags[1], "", $newtext);
return $newtext;
}
function newtexturize($text)
{
return $text;
}
function new_convert_chars($text)
{
return $text;
}
remove_filter('the_content', 'wpautop');
add_filter('the_content', 'newautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'newtexturize');
remove_filter('the_content', 'convert_chars');
add_filter('the_content', 'new_convert_chars');