If you expect your visitors to come to your blog frequently, having a gallery that displays the same content each day may be boring. On the other hand, if you have a gallery that slideshows different images every day, or every hour, may be a reason to come back again and again to your site.
A very good example of galleries that change daily is a Restaurant menu tutorial here or here. It teaches you how to create a gallery that displays a daily menu for each day in the week. Advanced knowledge is also presented, on how to create two additional galleries that display the menu for next two days. All three galleries can be set up in pages/posts or as widgets.
Here is what it may look like:
|Menu for Today
Hover your mouse over the gallery and you will see a popup message displaying the current meal name.
Here we will describe the minutely schedule of images, and create actual example of a “quarterly” schedule, which changes the content of the gallery each quarter of the hour – four image sets in total. We will also point out how you can combine more than one time designator in your galleries.
Here is the gallery:
And here is how to create it:
First we set up URL list, as shown below. Four separate folders on our web server, each with its own thematic images. Remember that all four entries should belong to a separate group, to avoid mixing with other galleries on our blog.
What makes the difference here is the slugs, each entry has
min designator, with the minutely schedule:
- between 00 and 20 is the time to display
- between 15 and 35 is the time to display
- between 30 and 50 is the time to display
- between 45 and 59 is the time to display
As you may have noticed, some time intervals overlap, e.g. between 15 and 20 minutes both
spring are displayed. And please be warned that the time here means the time of your blog, i.e. your web servers time is used for keeping up with the schedule, not your visitor’s local time.
Knowing that, on our server, now it is 9:06, you may deduct which season or seasons are displayed.
And here are current values of all time related slugs:
doy.171 moy.6 dom.20 dow.3 hour.9 min.06
The last thing to do here is to put the shortcode (or a widget, or both) to display a group that we set up in the URL list. Here is the shortcode:
[galdget_pp width=600 height=400 align=center group=15 buttons=all images=fill animation=ocw frame=extraframes/frame-1192312_640.txt ]
One more addition: if you want to create a widget with the above schedule, but you want it displayed only on one particular page or post, as described in the tutorial here, you can achieve this easily by combining slugs for time schedule and location, as we did in the widget you can see to the left and up from here, under the title “Hourly scheduled seasons”.
The actual URL list setup looks like this:
Finally, please keep in mind that you may combine more than one slug, be it time related or not. For example, you may use
dom.1-15,hour.0-12 to display some content during the first half of each month, but only before noon.