Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1240909
    flovian
    Participant

    Hello there,

    One question about embeding video in a responsive way in a product page on woocommerce:

    How do I do it? 🙂

    The output in the attached image is generated by this function in functions.php:

    function print_conferinta () {
    echo ‘<h3>Conferinta Procesul Innoirii Mintii</h3>’.”<br>”;
    echo ‘Conferinta va avea loc sambata, 19 noiembrie, de la ora 8:30 pana la ora 17:00 la Hotel Capital Plaza, Bd Iancu de Hunedoara nr. 54, Bucuresti.’.”<br>”;
    echo ‘Pranzul se poate servi in intervalul 12:30-14:00. Pranzul nu este inclus in pretul biletului’.”<br>”;
    echo ‘Va asteptam cu drag!’.”<br>”;
    echo ‘ ‘.”<br>”;
    echo “<br>”.'[x_video_embed]<iframe style=”border: 2px solid #442b48;” width=”560″ height=”315″ src=”https://www.youtube.com/embed/pXNJigghXcQ&#8221; frameborder=”0″ allowfullscreen> </iframe>[/x_video_embed]’.”<br>”;

    }

    Obviously the [x_video_embed][/x_video_embed] way didn’t work. And whithout these the iframe is not responsive.

    Thanks.

    #1240926
    flovian
    Participant
    #1241118
    Rupok
    Member

    Hi there,

    You can use the “Embedded Video” element in Cornerstone. Also the shortcode should work fine and it’s responsive as well if you see the example here – http://demo.theme.co/integrity-1/shortcodes/responsive-video/

    Thanks!

    #1241195
    flovian
    Participant

    Hy there,

    Well, I cannot use cornerstone on editing the woocommerce product pages.
    And on the other hand I posted in the picture how the video looks like if I use the embeded video tags.

    I’m sorry but neither of your suggestions should work in this case.

    #1241613
    Lely
    Moderator

    Hello There,

    Please change this part:
    echo "<br>".'[x_video_embed]<iframe style="border: 2px solid #442b48;" width="560" height="315" src="https://www.youtube.com/embed/pXNJigghXcQ" frameborder="0" allowfullscreen> </iframe>[/x_video_embed]'."<br>";
    To this:
    echo "<br>".do_shortcode('[x_video_embed]<iframe style="border: 2px solid #442b48;" width="560" height="315" src="https://www.youtube.com/embed/pXNJigghXcQ" frameborder="0" allowfullscreen> </iframe>[/x_video_embed]')."<br>";

    We have to parse the shortcode.

    Hope this helps.

    #1241993
    flovian
    Participant

    Many thanks Lely.

    Works perfect.

    #1241995
    Friech
    Moderator

    You’re more than welcome, glad we could help.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1240909 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>