How does the plugin work
This plugin is designed to display a randomly selected image and for a specified period of time regardless if the page is refreshed or closed.
The settings page has three options.
- Same image for all users
The options here are:Yes – display the same image for all users
No – display a different image to each individual use - Location of the images
The location of the images relative to the site root folder e.g. wp-content/uploads/[location-of-images]
No slash at the beginning or at the end of the input - Days to retain image
This is a multiplier needed to determine for how long to image is to be displayed. The next day/time to display the image is calculated by multiplying 86400 by multiplier and adding it to the current datetime (0.01 is roughly 15 minutes).
Note:
These are all the image types that are able to be displayed:
- avif or AVIF
- gif or GIF
- jpeg or JPEG
- jpg or JPG
- png or PNG
- svg or SVG
- webp or WEBP
For the sake of the demo pages the Days to retain image is set for about one minute.
The plugin can be downloaded from here
Usage:
Place one of the shortcodes shown below on a post or page (note: if that you must remove the leading and trailing space)