My link, “Click here to view my Photo Gallery” has always linked to Photo Bucket, a paid-for service that hosts my photos and provides a slideshow to visitors to it. Well I got tired paying them, so I decided to roll my own slideshow agent
in my WordPress server. It runs on a Raspberry Pi 4B. Here’s the way I have the logic:
I made a folder in /var/www/html called slideshow. In that folder I have 7 folders, each of them named things like
/Visit to Grand Canyon
/Visit to Alaska
/Misc Photos
and so on. When someone clicks my photo gallery link, a menu of categories will pop up. The Java script reads the folder names and creates the categories on the fly. If I were to drop a new folder into that /slideshow directory called, say….
“My Cats” then the My Cats category would automatically enumerate in the category list, and whatever
*.jpg files are in the folder would instantly be viewable as a slideshow.
Because I already have the working CSS, PHP, and Java script in the index.php file, I will provide that file to
you no charge. All you have to do is gather up your pics, arrange them into folders and place them in your newly
created /slideshow directory. When everything is in place, simply go to https://yourwebsiteaddress/slideshow and it
will look like mine at https://n7okn.com/slideshow. You make make your own link to it on your site how you want it.
Here’s my directory structure:

To install everything, first make sure you have a working WordPress installation. If not,
a working PHP installation is a must. Arrange the structure of your folders and files as shown.
Name your folders with friendly text as this is how the categories will appear. Only include pictures
with the file extension of .png or .jpg files in your category folders.
To install the magic that makes it all work, the the following lines at the Linux prompt on your Pi:
wget https://n7okn.com/slides
chmod +x slides
./slides
After it finishes, go to https://your website/slideshow.
If you have made a slideshow folder in the same structure as mine, it should work fine.
Contact me at john@qso.com if you have any issues.