I've created a custom widget and placed it in functions.php. You can see the widget here:
(I've also created a similar widget that grabs a random image; it's included with the pastebin.)
The widget allows users to plug in up to ten blocks of text/HTML, stores them in an array in JS, and displays one at random using JS.
These are super simple widgets that are based on the default text widget that ships with WP. (I'm no PHP expert, so there's probably a more elegant way to create them, but they're simple to use, which is what the client needed.)
The problem I'm having is this:
Using more than one Random Text widget, even on multiple different sidebars displayed on different pages, causes all but the original to return 'undefined'.
The text that you put in the box seems to store properly, and is editable through the WP admin interface; but when it comes to displaying it on the front-end, it doesn't echo the text properly.
I'm sure it's something simple that I'm missing in the widget...any clues?