In Advanced Custom Fields plugin, is it possible to display a WYSIWYG editor field in which p tags are omitted?

2 Answers 2


strip_tags() is not bad, but there may be a lot of tags you'll have to allow. So maybe you can use str_replace() to only get rid of the <p>-tag:

  $field = get_field('wysiwyg'); // your wysiwyg field data
  $strip = array('<p>','</p>'); // search for <p>
  echo str_replace($strip,'',$field);

Natively, I don't believe there is a way to do that. Are you looking to remove just P tags, or all html tags? In your template, you could use:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.