Hi, there!
I need assistance to create a video gallery, or at least to display all my videos in the front end. Let me explain it to you 🙂
I´m creating a portfolio and I need to show video and image in some projects.
This is a project content type, displaying image with a gallery and working ok: hidden link
I need to do the same with video ¿Is it possible?
anyway, when I trying to display video in my projects I have several issues:
1) I can´t display all the videos included in back end (with a repeater field) I just display one of them. (see image in attachment)
2) I only can display one video and with a very big size. I need to set the size of video.
3) Finally, when I don´t include images in the image gallery (back-end again) the system show me the featured image by default (and I can´t avoid it).
Hello,
Q1) I can´t display all the videos included in back end (with a repeater field) I just display one of them.
Your screenshot isn't in English, I assume we are talking about a multiple-instances field, if it is, please try the Views shortcode [wpv-for-each] to display all instances of video field, see our document:
https://toolset.com/documentation/user-guides/repeating-fields/#Displaying%20Repeating%20Fields
If you want to fine-tune the output for repeating fields, you can use [wpv-for-each] shortcode. For example ...
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-for-each
Q2) I only can display one video and with a very big size. I need to set the size of video.
How do you setup the "video" field? is it a custom "Video" field or custom "Embedded media" field?
If it is a custom "Embedded media" field, please check our document to setup the shortcode, and specific the "width" and "height" attributes:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
Q3) Finally, when I don´t include images in the image gallery (back-end again) the system show me the featured image by default (and I can´t avoid it).
The featured image should be outputted from your theme files, for example, you can try these:
1) your custom post type slug is "my-cpt", you can copy theme file "single.php", and save it as "single-my-cpt.php", edit it, find and remove the codes for featured images.
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
2) create a content template for single "my-cpt" post,
https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/
In this content template, use [wpv-for-each] shortcode to display the multiple-instances image field (image gallery) as what you want.
Thank you so much!!! I´m implementing everything and is running ok!!! 🙂