Support

Account

Home Forums General Issues ACF field content as Codeblock

Helping

ACF field content as Codeblock

  • Hi, I have the following issue:

    I have an ACF single line textfield with an iFrame code inside. Showing the content of the iFrame works like a charm so far.

    Now I want on the same WP page to show the iFrame (source) code as plain text – for registered users to copy. Is this somehoe possible, maybe with the use of CSS?

    Thanks a lot for helping!
    Nik

  • You need to scape the iframe html into a textarea, something like this:

    <textarea>
      <?php html_special_chars('<iframe></iframe>')?>
    </textarea>

    Where “<iframe></iframe>” should be the result of your field.

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

You must be logged in to reply to this topic.