Support

Account

Home Forums Add-ons Flexible Content Field Inline tags are removed from p's when WYSIWYG in nested flex content

Solving

Inline tags are removed from p's when WYSIWYG in nested flex content

  • I am using Timber plugin for templating, and am running into an issue with inline tags within a Repeater > Flexible content > WYSIWG field. Inline tags (e.g. anchors, strong, em) within paragraphs in the WYSIWG seem to be stripped out but if they are within a heading tag, they print as expected. My template code is:

    {% for content in post.get_field('content') %}
                {% if content.acf_fc_layout == 'section' %}
    
                        {% for blck in content.blocks %} 
                            {% if blck.acf_fc_layout == 'block_text' %}
                                    {{blck.text}}
                            {% elseif blck.acf_fc_layout == 'block_list' %}
                                    {% include 'blocks/block-list.twig' %}
                             {% endif %}
                        {% endfor %}
    
            {% endif %}
    {% for %}

    Relevant Github issue on Timber.

    Is this a bug within Timber regarding wpautop? Any help much appreciated.

  • I’m getting the same issue and I’m not using Timber.

  • Bump, anyone? Definitely a problem not to be able to add links to main content areas in there.

  • Hi laras126,

    Links are working on my end (not using Timber/twig). Headings are also working, it just seems to be paragraph tags that are getting stripped. I’m not modifying the wpautop function anywhere, have deactivated all plugins and also tried the TwentyFifteen theme.

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

The topic ‘Inline tags are removed from p's when WYSIWYG in nested flex content’ is closed to new replies.