Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #280374

    We have the following in a text block on our home page (always entered on the “Text” tab of the editor):

    <div class=”js-video [vimeo, widescreen]”><iframe style=”width:100%; height:100%; frameborder:0; byline:0; title:0;” src=”//player.vimeo.com/video/98497797″ webkitallowfullscreen mozallowfullscreen allowfullscreen seamless></iframe></div>

    ———–

    After we save this code and access it again on the “Text” tab of the Edit, there is an extra “<p>” added at the beginning and a pair “<p></p>” added at the end to result in:

    <p>
    <div class=”js-video [vimeo, widescreen]”><iframe style=”width:100%; height:100%; frameborder:0; byline:0; title:0;” src=”//player.vimeo.com/video/98497797″ webkitallowfullscreen mozallowfullscreen allowfullscreen seamless></iframe></div>
    <p></p>

    Can you explain why these are added? Note: We remove all blank lines before and after the code.

    Since the first “<p>” doesn’t have a matching “</p>” I’m especially concerned that we have an unmatched “<p>” or “</p>” somewhere in our code. Do you have any idea why these codes are being added? Can you help me narrow down where the source of the issue (possibly a code file or another page’s code?) is?

    Thanks in advance for your help in troubleshooting this.

    #280418

    Hey Jane!

    Yes, wordpress adds the p tags automatically to the text content if a textblock element is used (wpautop filter). If you want to add raw code/text to the website please use the code block element instead: http://www.clipular.com/c/5302603256692736.png?k=X97eUXOWCRejlsF8eREUJnP78hg – the code block does not use the wpautop filter to sanitize the text but just embeds the raw user input.

    Best regards,
    Peter

    #280450

    Hi Dude – Thanks for the suggestion to use the “Code block” instead of the “Text Block”. We are using the Enfold theme from 3/30/2014 and I don’t see the “Code block” in the “Content Elements”. Is the “Code block” available in the Enfold theme? If so, maybe it was added after 3/30/2014? Or maybe there’s a switch to turn it on?

    Any guidance you have would be great.

    Thanks!

    #280493

    Hey!

    Please update Enfold to the latest version 2.8.1 via FTP – http://vimeo.com/67209750
    and Code Block element should show up

    Regards,
    Yigit

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