[theme-reviewers] Need a theme for testing
Otto
otto at ottodestruct.com
Thu Oct 28 22:23:58 UTC 2010
On Thu, Oct 28, 2010 at 5:10 PM, Chip Bennett <chip at chipbennett.net> wrote:
> That reminds me, though (don't ask how; can't explain my train-of-thought):
> I'm wanting to come up with a best-practice way of implementing "default"
> widgets to display if no widgets are added by the user to the defined
> sidebar(s).
> I'm thinking of using the_widget() inside of the conditional for the
> sidebar. Any issues/problems with this approach, or anything I need to
> consider?
> (Sorry if this is a dumb question; I've had a really long week...)
> Chip
Using the_widget there is no different than simply hardcoding
something, really. Everything inside the conditional goes poof when
the user puts a widget into place.
In theory you could add code to a) detect the case where there's no
widgets in the sidebar and b) put some there. I'm not sure it'd be
worth it.
If it were me, I'd leave the sidebars blank. Widgets only, no fall
through default case. At least that way, when the user activates the
theme and sees an empty sidebar, then they can go put some widgets in
it.
You could go a step further and, for the default case, detect if the
viewing user is an administrator and put a message there saying "You
don't have any widgets defined, why not go put some in?" and give them
a link to the widgets screen. That'd be the best UX I can think of.
Displaying something by default that magically goes away when they
configure it is a pretty poor experience, but giving them a helpful
hint and telling them where to go is much better.
-Otto
More information about the theme-reviewers
mailing list