Support

Account

Home Forums General Issues Removing Paragraph Tags from WYSIWYG Fields? Reply To: Removing Paragraph Tags from WYSIWYG Fields?

  • For those who would like to strip p tags, but keep br tags (or other tags), you can process the output of the field with strip_tags like so :

     $field = get_field('my_wysiwyg_field');
    $formatted_field = strip_tags($field, '<br>');
    echo $formatted_field; ?>

    Simple, yet effective