Home Forums Front-end Issues Wysiwyg field loses its tags when outputted


Wysiwyg field loses its tags when outputted

  • Hi,

    I have added an advanced custom field to my events but for some reason the paragraphs on the custom field text are missing.

    The original formatting on the custom fields wysiwyg has all the paragraph tags but then they are stripped once events manager outputs the custom field to the event.

    See attached images of the problem:

    Does someone know how to fix this issue?

  • You could make use of remove_filter() and have your field call like this:

    the_field('wysiwyg_field', false, false);

    If that is stripping away what you need, try this:

    the_field('wysiwyg_field', true, true);

    If that still doesn’t generate what you want, in the WYSIWYG field settings, change the editor mode to ‘Text’ which will retain all of your HTML tags. You won’t get a WYSIWYG preview on edit screens but your formatting will remain intact.

    See this thread for more info:

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Wysiwyg field loses its tags when outputted’ is closed to new replies.