How would one go about creating a gallery page which is a gallery of galleries - using a specific photo from the subgallery as a cover for the album?
This is what I have so far.
I have a folder on the backend built using WP Media Folder called master
. I want the galleries page to list a thumbnail for each folder inside of master
and a name of the gallery the thumbnail belongs to.
Here is what I have.
$galleries = get_terms( 'wpmf-gallery-category', [ 'hide_empty' => 0 ]);
foreach ( $galleries as $gal )
{
if ( $gal->name != 'master' )
{
?>
<div id="gallery-id-<? $gal->ID ?>" class="cell medium-3 margin-x text-center" style="border: solid black; ">
<figure class="cell">
<img src="<?= // Get sub-gallery thumbnail ?>" alt="<?= $gal->name?>">
</figure>
<div class="detail">
<span>
<?= $gal->name ?>
</span>
</div>
</div>
<?
}
}
I guess the question is, how do I access the images by the folder they are in? I don't see how WP Media Folder links to the images. I need to be able to query and get the image srcs from the gallery element id.