Support

Account

Home Forums General Issues How to get rid of extra lines from ACF WYSIWYG content! Reply To: How to get rid of extra lines from ACF WYSIWYG content!

  • Thank you for your response! I can add php code while using elementor either by using dynamicooo´s raw PHP widget or by just adding a PHP Code snippet with the code snippet plugin.

    But the code:

    remove_filter(‘acf_the_content’, ‘wpautop’);

    Does not remove the p tags (line breaks) that are added to any WYSIWYG content that gets loaded into a page by the elementor dynamic tag.

    Currently my workaround is that I remove the space those p tags create (which is caused by the theme settings at least thats what someone else told me):

    p {
    margin-bottom:unset;
    }

    This won´t help if I would want a WYSIWYG text content included manuelly set linebreaks to flow into an existing text.

    Meaning something like this won´t work:

    This is the text that is in the page and now I want <THIS SNIPPET INCLUDING THIS
    INTENTIONAL LINE BREAK> to be sticked into the original text.

    Because it would look like this:

    This is the text that is in the page and now I want
    <THIS SNIPPET INCLUDING THIS
    INTENTIONAL LINE BREAK>
    to be sticked into the original text.

    If you have a working approach for that, then it would be fine to know it just in case 🙂