Hi, seasons greetings from Norway. :)
I need to determine the number of objects (txt files, images or other content) in a folder, and select one of them at random. This object will then be shown in a sidebar that is not populated by other widget from the control panel. I have code in the relevant sidebars in the templates to fetch a php-file which should determine and show this random content.
I imagine something similar is used to display random pictures in the heading of the Twentyeleven theme, except from the part determining the number of pictures.
Any ideas on how to code this?
Edit: It would be great if the selected object could be logged as shown each time it's shown as well, but that's not the most important thing right now.