My pages have a sidebar with too many widgets, and it looks bad when the content is short and the sidebar is too long.
I want to randomize the widgets I’m showing in the sidebar. Meaning I will add all the potential widgets to the sidebar, and it will randomly only display a few.
I would also like some control over this, for example to have a few widgets always appear, and only the rest randomized.
I tried finding relevant plugins, but the only ones I found just randomized images or posts.. never different types of widgets.
Here comes the workaround solution discussed in the comments:
functions.php:
sidebar.php
This example code is very minimal and could be improved in many ways but it works and should serve as a good starting point.
PS: I really like the random widget idea. I will look for a better solution when I have more time. It’s a good plugin inspiration 🙂
Though not completely answering your question, you could use the code presented on this page as a starting point. It’s just about randomizing the order, but with a few modifications you could make this function do exactly what you need…