Unable to display thumbnails in a gallery
-
I have a WP_Query that is pulling thumbnails and links to attachment posts. It works with images, but I’m having a hard time getting it to show thumbnail images on videos, using the videopack shortcode.
Here’s the relevant bit of code. I tried a few ways of doing it (below):
do_shortcode('[videopack gallery="true" gallery_include="'.$this_id.'"][/videopack]'); $thumbnails[] = do_shortcode('[videopack gallery="true" id="1021"]'); $thumbnails[] = do_shortcode('[videopack gallery="true" id="'.$this_id.'"]'); $thumbnails[] = do_shortcode('[videopack gallery="true"][/videopack]'); $thumbnails[] = do_shortcode('[videopack gallery="true" ids="'.$this_id.'"][/videopack]'); $thumbnails[] = do_shortcode('[videopack gallery="true" include="'.$this_id.'"]');
(by the way, I verified that $this_id was set correctly) but they all gave me empty divs like:
<div class="kgvid_gallerywrapper kgvid_textalign_left" id="kgvid_gallery_0" data-query_atts="{"gallery_orderby":"menu_order ID","gallery_order":"ASC","gallery_id":1,"gallery_include":"","gallery_exclude":"","gallery_thumb":"250","gallery_thumb_aspect":"true","view_count":"false","gallery_end":"","gallery_per_page":"","gallery_title":"true"}"></div>
I did generate thumbnails using videopack. Also tried toggling the plugin setting of “attach thumbnails to” (tried post and video) and clicking “set all parents”, but that did not change things.
See demo on my dev site at https://historyscv-dev.dreamhosters.com/media/?vhs_year=1992&ensemble=vanguard – use the username: guest / password: guest to view it. Also here’s a single video attachment page whose thumbnail should be included in the earlier link but isn’t showing.This doesn’t have to use the [videopack gallery=”true”] shortcode – ultimately I first just want to get thumbnail images for video posts inside The Loop, and I can do the rest of the things other ways.
Also, is there supposed to be more documentation on https://www.videopack.video/ ? the “docs” link in the main nav just directs to the homepage where there are only a couple of basic examples.
- This topic was modified 1 year, 8 months ago by . Reason: clarified goal
- This topic was modified 1 year, 8 months ago by . Reason: added single attachment
The page I need help with: [log in to see the link]
- The topic ‘Unable to display thumbnails in a gallery’ is closed to new replies.