I want allow paragraphs in post_meta of custom type. I think is with WPautopop but how use it in this code? Really thanks

<?php $metacontenido = get_post_meta($postid, 'ofertacontenido', true);
    if($metacontenido != $empty) { echo "".$metacontenido.""; }?>
有帮助吗?

解决方案

The wpautop() function will automatically convert line endings to <p> tags. You can read more about it here.

<?php $metacontenido = get_post_meta($postid, 'ofertacontenido', true);
      if($metacontenido != $empty) { wpautop($metacontenido); } ?>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top