Tagged: x
-
AuthorPosts
-
November 2, 2016 at 10:30 am #1240909
flovianParticipantHello 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” 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.
November 2, 2016 at 10:35 am #1240926
flovianParticipantWeblink: http://danielfusarea.ro/index.php/product/bilet-conferinta-procesul-innoirii-mintii/
WP Version 4.6.1
Woocommerce Version 2.6.6November 2, 2016 at 12:21 pm #1241118
RupokMemberHi 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!
November 2, 2016 at 1:10 pm #1241195
flovianParticipantHy 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.
November 2, 2016 at 7:11 pm #1241613
LelyModeratorHello 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.
November 3, 2016 at 1:51 am #1241993
flovianParticipantMany thanks Lely.
Works perfect.
November 3, 2016 at 1:52 am #1241995
FriechModeratorYou’re more than welcome, glad we could help.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1240909 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
