Insert and display HTML / script in a field

Support General Insert and display HTML / script in a field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33313
    info@ceescoenen.nl[email protected]
    Participant

    Hi,

    I will add this code text in a field to display different video's:

    <div class="vadoo_player"></div>
    <a href="https://video.ceescoenen.nl/static/vadoo_player.min.js">https://video.ceescoenen.nl/static/vadoo_player.min.js</a>

    I can't save this on a textfield so I have change to a Wysiwyg. How to echo this field so that it display the video?

    #33322
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can use the field textarea or wysiwyg to add the HTML code and output the value with the echo function. But the content (HTML tags) might be filtered by sanitization. You can follow this documentation to bypass it https://docs.metabox.io/sanitization/

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