Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Display a set of widgets in random order? (http://forum.bytesforall.com/showthread.php?t=14090)

damian May 8, 2011 09:27 PM

Display a set of widgets in random order?
 
Can anyone tell me how to display a set of widgets in random order in a sidebar?

Specifically, every time someone visits a page/post they haven't visited before, I'd like them to see the widgets in a different order. But there are a few widgets I'd like to be "anchored" in place. So, for example, I'd like them to see:

Page/post 1 left sidebar:
widget 1
widget 2
widget 3
widget 4
widget 5
widget 6

Page/post 2 left sidebar:
widget 1
widget 2
widget 3
widget 6
widget 5
widget 4

Page/post 3 left sidebar:
widget 1
widget 2
widget 3
widget 5
widget 6
widget 4

Please note that I plan to use way more than 6 widgets, so I'll need some sort of randomize/shuffle function rather than hard-coding the widget order for each page. Also, it's okay (perhaps even preferable) if the widgets are displayed in a different order every time someone refreshes a page/post.

I looked for plug-ins and solutions elsewhere on the web, but I couldn't find anything.

Thanks in advance for any help anyone might provide!

juggledad May 9, 2011 06:05 AM

You might be able to use widget logic and put a bunch of widgets in the sidebar then put a php random test in each one.

However, I don't think this is a very good idea. People are use to looking to the sidebar for constant information, links etc. I'm not sure I would revisit a site where the number of widgets and the actual widgets changed in a random order. It would be too confusing and distracting.

damian May 12, 2011 04:10 PM

Come to think of it, you're probably right. Thanks for your reply.


All times are GMT -6. The time now is 04:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.