Embedding multiple videos
This topic contains 16 replies, has 3 voices, and was last updated by creativeartandsoul 9 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: embed videos, more info tab, multiple videos, yourube videos
-
AuthorPosts
-
July 14, 2015 at 5:31 pm #45740
Hi Everyone!
I was hoping to that my customers would be able to upload multiple videos into their listing. I’ve tried a few things:
1) I embedded several videos into the “More Info” tab, and renamed the tab Videos. The result is a string of multiple videos (Yay!), but they look unsightly (ICK!)…all squished & narrow. I understand that users can click “full screen,” but first impressions are everything, especially when I’m taking customer’s money. 🙂 The other undesirable thing that happens is that another new tab is automatically created (Video)that includes only the last video from the list of uploads. See Pic #1 & 2
If I deselect “Show in More Info tab” in the video field, I still only get the one last video from the list in the auto-created tab.
2) The second thing I tried was to create new video tabs using the Textarea fieldset (just as the default video field) and naming them video1, video2, video3, etc. I can get the tabs to show some of the time, but the video embed doesn’t work at all and I only get blank tabs (bummer). See pic#3.
I would like to offer at least a 4 video embed. Scenario #1 would be best if I could have all the videos in one tab either in the “More info” tab (not squished flat), or all in the auto-created video tab. OR, I would be Ok with having multiple video tabs (using textarea fieldset) if that would work, but I prefer scenario 1.
Is there any way to fix this?
One more quick question….is there a maximum number of tabs I can have in a listing? At some point in my testing I had 2 rows of tabs (assuming a customer might go crazy & fill video tabs, audio tabs, uploads, etc) , but I haven’t been able to duplicate that again.
Thanks so much for your help!
Cheers, KrisJuly 14, 2015 at 10:23 pm #45766Use a HTML field.
Technically, you can use as many tabs as you like, but once the first row is full things will get ugly …
If you use an HTML field you can add as many videos you like to the one field.See my test site here [ignore all little errors at various places, it is a test site):
http://geo.goldroo.net/accommodation/hotels/chestnut-hill-hotel/July 14, 2015 at 10:47 pm #45770Thanks for your reply, Guust!
When I use the html fieldsets for embedding videos, only the code comes through as text. See pic, please. I can’t figure out why it’s not working on my end. Thanks for checking into this.
Cheers! Kris
July 14, 2015 at 11:02 pm #45776You must add the code to the text editor, not the html editor?
Post your URL and admin details if you want me to have a closer look.July 14, 2015 at 11:09 pm #45780This reply has been marked as private.July 14, 2015 at 11:14 pm #45784Forgot to mention that the above settings are in the Nonprofits CPT.
Thanks!July 14, 2015 at 11:17 pm #45786Like I said: You must add the code to the text editor, not the html editor.
I corrected the video2 tab data.July 15, 2015 at 12:59 am #45795THank you, Guust.
That’s really odd, because when I add the code to the text tab of the editor, save and publish, I get a completely blank tab. When I open the editor to go back and edit, the text box is completely blank as if I never had pasted anything.
What am I missing?July 15, 2015 at 1:33 am #45796I guess you are trying to add the code from the frontend.
If you add it from the backend, it works [see video1 tab].
I don’t understand why, we’ll have to call in the wizards.July 15, 2015 at 1:38 am #45797Yes, I’m working from the front end and trying to get the “user experience” and work out the kinks before launch.
I definitely want my customers to be able to upload from the front end…LOL… I really don’t want to have to do it for them. 🙂
Thanks again.
KrisJuly 15, 2015 at 2:14 am #45798Let’s wait for the wizards. They are still asleep on the other side of the world, so stand-by.
I guess it has something to do with the fact we are trying to add an iframe.July 15, 2015 at 5:00 pm #45836Hi,
the html custom fields strips iframe embeds for security reasons. The only field in the form that will accept iframes is the video field.
If you add more than 1 videos, they are currently placed one on top of the other, so only the last one is showing.
This is due to making the video box responsive (youtube iframes are not responsive). We already spent hours trying to do this without adding another script (that would slow down the page) and we still haven’t found a solution.
With this code in your theme functions.php, you can allow iframes on a specific custom field (video1):
// This example allows iframes on the custom field "video1" add_filter('geodir_save_post_key',"my_allow_html_tags",10,2); function my_allow_html_tags($tags, $pkey){ // $pkey is "geodir_" followed by the field HTML variable name, eg: "geodir_video1" if($pkey=='geodir_video1'){ $tags .= "<iframe>";} return $tags; }
We are still trying to find the definitive solution for the Video tab. We will keep you posted.
Let us know if this helps.
Thanks
July 15, 2015 at 5:31 pm #45842Hi Paolo! Thanks for your assistance, but I’m still not getting anywhere.
I went to: Dashboard > Appearance > Editor > Theme Functions
and added the full code you provided & updated. Then edit listing > added YouTube code in Video1 box under Text tab > save > Publish and …..nothing. 🙁Again, when I go back to edit view and check video1 box it is blank as if I never added anything. I tried several times. I am doing this from the front end as if I were a user.
Am I missing a step in there? Sorry for the trouble.
Thanks again!
KJuly 15, 2015 at 5:37 pm #45844Hi,
your html variable was Video1, while that script required it to be video1.
A capital letter can change it all.
Changed and tested on your website and now it works.
I’m settings this as resolved for now.
Thanks
July 15, 2015 at 7:05 pm #45856It’s perfect! I can even get more than one in there! Thank you!! You made my day!
LOL…that’s why we leave the coding to you! I’d pull every single hair out trying to fish out minor but important details like that all day! I would have never found that.
Thank you, again!
K -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket