Hi crayoncrisis,
Thanks for the post.
Here’s what I did to solve my problem. I used php to get the current season, thus pointing me to the right location. Then, I use PHP to read all contents of the folder (excluding the . and ..). Lastely, I use jQuery (I found a simple script online at https://jonraasch.com/blog/a-simple-jquery-slideshow) with some CSS for the slideshow. I inserted the HTML into my header.php file. You can find the jQuery and CSS at the URL above.
Thought I would share…thank you all for your time and help.
HTML:
<div id="photo">
<?php
// Gets current season
$y = date("Y");
if (time() < mktime(0, 0, 0, 3, 21, $y)) { $season = "winter"; }
elseif (time() < mktime(0, 0, 0, 6, 21, $y)) { $season = "spring"; }
elseif (time() < mktime(0, 0, 0, 9, 22, $y)) { $season = "summer"; }
elseif (time() < mktime(0, 0, 0, 12, 22, $y)) { $season = "fall"; }
else { $season = "winter"; }
// Reads contents of folder based on season, then displays each item
// Make sure first image file name is banner_01.jpg
$folder = dir ("wp-content/themes/clt_v1/styles/images/" . $season . "/"); ?>
<img src="<?php bloginfo('template_url'); ?>/styles/images/<?php echo $season ?>/banner_01.jpg" alt="Congaree Land Trust <?php echo ucfirst($season); ?> images" class="active" />
<?php
while ($folderEntry = $folder->read()) {
if ($folderEntry == '.' || $folderEntry == '..' || $folderEntry == 'banner_01.jpg') {
// Does nothing...skips '.', '..' and 'banner_01.jpg' result
} else { ?>
<img src="<?php bloginfo('template_url'); ?>/styles/images/<?php echo $season ?>/<?php echo $folderEntry ?>" alt="Congaree Land Trust <?php echo ucfirst($season); ?> images" />
<?php
}
}
$folder->close(); ?>
</div><!-- End photo -->