• Resolved thales007

    (@thales007)


    I have created a template that uses a custom field (plain text). When the text is added on the live page, there are paragraph tags (<p>) added around the text. I have also tried changing my custom field to WYSIWYG (Visual Editor) and I get the same results.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey @thales007

    It’s looks like wpautop is getting involved.

    Can you tell me a couple of things about your setup:

    1) How you are creating your layout, via our admin page (with shortcode) or the block editor?
    2) Is this added to your page via the block editor/classic editor/page builder?
    3) And how are you creating your custom field, via standard WP custom fields, or a plugin? (eg, ACF/PODs)

    Hopefully I can replicate this and fix – an update is due out on Monday.

    Thanks

    • This reply was modified 3 years, 8 months ago by Code Amp.
    Thread Starter thales007

    (@thales007)

    1) Layout is being created using the admin page.
    2) Added to the page using the shortcode in the block editor (shortcode block).
    3) Custom fields are created with PODs. It is a custom field added to a custom type.

    Plugin Author Code Amp

    (@codeamp)

    Hi @thales007

    So I’ve had a look into this.

    I think you are using a Plain Paragraph Text field or the WYSIWIG editor? And I’m assuming you see those <p> tags in the admin layout editor too?

    I’ve realised that PODs is in fact adding markup (by nature of the field you’ve chosen) – so the issue is, that we were escaping all output as if it was plain text.

    I’ve just updated the plugin (my dev version only) to allow for custom html on the frontend, so this will work in the next update.

    The only issue is right now I’m not sure how to render that html in the admin area for an accurate preview, you’ll have to live with seeing the code there for now :/

    Best

    • This reply was modified 3 years, 8 months ago by Code Amp.
    Thread Starter thales007

    (@thales007)

    Yes, I am using the WYSIWYG editor. I do see the markup in the admin area, which is totally fine. Thanks for adding this into the next update!

    Plugin Author Code Amp

    (@codeamp)

    As of v1.3.1 – custom fields now have a “HTML” type – which will utilise the field as you wanted.

    We also added this to the preview in the admin area ??

    Thread Starter thales007

    (@thales007)

    Thank you! I can confirm that v1.3.1 has fixed this issue. All I had to do with switch the type from text to HTML. Works great in the admin area and front end.

    Plugin Author Code Amp

    (@codeamp)

    Great stuff – let us know if anything else comes up.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Template with custom field adds around text’ is closed to new replies.