Hello
Am trying to have a lightbox get the data from a custom field, I tried with ACF and with the fonctionality offered by Toolset.
am using this plugin: https://wordpress.org/plugins/video-popup/ That I saw one of your techinicien mention in another ticket, but I can't make it work..
This is my code: [video_popup url="[wpv-post-field name='video-url-media]" img="[wpv-post-field name='images-multimedia']"]
Is there a better way to do this or another plugin that I can use ?
Thank you !
Cordialy,
Éric
Hello, first please try testing the wpv-post-field shortcodes outside the video_popup shortcode to see if they are producing the expected results (note I added the missing single quote in the video-url-media shortcode):
Test video-url-media field: [wpv-post-field name='video-url-media']<br />
Test images-multimedia field: [wpv-post-field name='images-multimedia']<br />
- What are the results of these two shortcodes displayed independently?
- Are these fields created in Types or in ACF? If the fields were created in Types, you must use the wpcf- prefix with the field slug in the name attribute:
Test video-url-media field: [wpv-post-field name='wpcf-video-url-media']<br />
Test images-multimedia field: [wpv-post-field name='wpcf-images-multimedia']<br />
- What types of fields are they - image, video, URL, single-line text fields, etc.?
- Do these fields support multiple values (also referred to as repeating fields), or only single values? You can configure this option when you edit the parent field group(s) in Toolset > Custom Fields > Post Fields.
Then, test the video_popup shortcode using hard-coded, known media URLs, to verify it is working as expected without Toolset involved:
Video popup test: [video_popup url="<em><u>hidden link</u></em>" img="<em><u>hidden link</u></em>"]<br />
Replace the video and image urls in this example snippet as needed. You should include the URLs of a known YouTube video and a known, existing image file from your Media Library.
- What is the result of this video_popup test with hard-coded URLs?