• Resolved newpatriks

    (@newpatriks)


    Hi.
    I’m using the Custom Fields plugin in my WordPress. I have a page with a 12-15 videos that I’d like to load using this plugin. To put the videos I add a row (with custom fields plugin) that contains a video input fill. The page will renders an iframe with the url I put on the backend form.

    1. The plugin doesn’t get the video because it’s inside an iframe?
    2. I tried a weird way: With jquery I added the video url in the code after rendering the page, but still no working.
    3. I don’t underestand at much the way to put the video-url. Most of my videos are from youtube. Do I just need to put the video like that?

    <div class="foo">
    <h3>something here</h3>
    <p>Lorem ipsum ...</p>
    <div class="video">http://www.youtube.com/watch?v=ID</div>

    https://wordpress.org/plugins/lazy-load-for-videos/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author kevinweber

    (@kevinweber)

    Hi,
    is the plugin working as expected when you don’t add the videos with the Custom Fields plugin?

    To test this, do the following:
    Easily insert the Youtube URL into a post using the article editor. The URL must be on its own line and must not be hyperlinked. [“WordPress will automatically turn [the URL] into a YouTube embed when the post is viewed.” (Source: http://codex.wordpress.org/Embeds)]

    Regards,

    Kevin

    Thread Starter newpatriks

    (@newpatriks)

    Hi Kevin.
    Yes when I’m not using Custom Fields it works perfectly.

    I think that I found the problem. It could be that when I’m using Custom Fields (basic input text or a textarea) it puts a \n at the final of the string and it’s being saved with the video string (http://www.youtube.com/watch?v=ID\n)?.

    I say that because I removed the <p> and </p> (in the case that I was using textarea) and didn’t work, but then I removed the \n as well and It worked.

    Regards.
    Jordi.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not working with Custom Fields’ is closed to new replies.