Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #264987

    I am having strange results from a YouTube video that is embedded in my WordPress website that is using the Enfold theme. I downloaded Enfold on May 5th so it is already the latest version 2.7.1. I want the video to open an embedded window on my website to show the video as opposed to taking the viewer to the YouTube website.

    The video in question is the bottom of the two on both my Homepage http://contextm.com and my About page http://contextm.com/about/

    On my homepage the custom URL is https://www.youtube.com/watch?v=7kYQBVFls9g?t=51m3s This link opens the desired embedded window on my website but it always starts at the BEGINNING regardless of browser (Safari, Firefox, Chrome, IE) or platform (Mac, Windows).

    On my About page the Custom URL is http://youtu.be/7kYQBVFls9g?t=51m3s It forwards the user to YouTube and starts the video at the CORRECT timestamp of 51:03, albeit not embedded as I desire.

    How can I get the embedded video to start at the desired time?

    As a point of information I am an ab initio user of both WordPress and the Enfold theme. While we were building the website this feature was initially working perfectly when we started the build on WordPress 3.9. It seemed to stop working when we updated to WordPress 3.9.1.

    Any help will be greatly appreciated as the site is now live and this aspect is not performing properly.

    Thanks in advance!

    #265029

    Hi!

    Use the short URL format, WordPress normally strips all parameters from YouTube URLs. It’s not a theme issue.

    Best regards,
    Josue

    #265160

    Thanks for the prompt reply.

    I apologize if I ask rudimentary questions.

    When I use what I think you are calling the short URL format it does not show the video as embedded but rather takes you to YouTube and the user has to hit the back button to get back to my website.

    Please take a look at the difference between my two implementations of the same video at contextm.com and contextm.com/about. It is the bottom of the two on both pages.

    The About page uses what I think you are calling the short URL format (see my actual URLs in my first post of this thread).

    If I am wrong about what a short URL is can you please tell me the correct short URL for my video on YouTube to open an embedded window on my website and start the video at the correct time.

    Thanks a million for all of your time and consideration.

    Best,

    -jeff

    #265624

    Hi Jeff!

    Use this exact URL for the link:

    https://www.youtube.com/watch?v=7kYQBVFls9g&hl=en_US&t=3063

    Then, add this add the very end of the theme functions.php file:

    function add_custom_script(){
    	?>
    	<script type="text/javascript" charset="utf-8">
    	   jQuery(window).load(function(){
    	       jQuery("a[href='https://www.youtube.com/watch?v=7kYQBVFls9g&hl=en_US&t=3063']").prettyPhoto({
    	       	   social_tools:'',slideshow: 5000, deeplinking: false, overlay_gallery: false,
    	           iframe_markup: '<iframe src="{path}&start=3063" width="{width}" height="{height}" frameborder="no"></iframe>'
    	       });
    	   });
    	</script>
    	<?php
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Josue

    #534405

    Is there an update for this since prettyPhoto is no longer used? Thanks!

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