[Resolved] New line formatting in headline dynamic options

Home Forums Support [Resolved] New line formatting in headline dynamic options

Home Forums Support New line formatting in headline dynamic options

  • This topic has 7 replies, 5 voices, and was last updated 1 year ago by Ying.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1929830
    Jesse

    Hi,

    When using a Headline block to get an ACF Textarea or WYSIWYG field via dynamic options it strips the new line formatting so there are no hard returns or paragraphs.

    I can add a <br /> to a textarea, but the WYSIWYG field removes them when switching back to the Visual tab.

    Is there a filter to disable the automatic formatting happening on the Headline block?

    #1930845
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The Headline block wasn’t built with the purpose of outputting paragraphs of text.

    This would be better in our Dynamic Content block, however it isn’t currently possible to output custom post meta. I’ve logged an issue for this.

    For now, you’ll want to simply create a shortcode and use it in your template:

    add_shortcode( 'my_meta_content', function() {
        return get_post_meta( get_the_ID(), 'my_meta_key', true );
    } );
    #1930878
    Jesse

    Thanks Tom, this will work for now!

    #1932084
    Tom
    Lead Developer
    Lead Developer

    No problem!

    #2266095
    Ana Rosiris

    Hi Tom,
    How can I use your explanation in my website?

    Thanks

    #2266147
    Ying
    Staff
    Customer Support

    Hi Ana,

    Can you open a new topic and describe your issue?

    #2570160
    Filip

    Got the same issue with WYSIWYG and this solution isn’t working for me.

    I’ve made the shortcode and put it in the template and it still doesn’t add paragraphs automatically.

    However – if I switch from Visual to Text editor, and add <p> manually, then it works.

    Is there any solution to this?

    #2570221
    Ying
    Staff
    Customer Support

    Hi Filip,

    This is an old topic, can you open a new topic for your issue?

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.