To all the WordPress gurus: as you know, register_sidebar has a property called description since WP 2 .9. I can access that property in the widget code by using the $description variable, but is there a way to reference that variable in my theme?
What I would like to do is be able to show sort of a title for a widget ready area, without using other tricks or additional theme options. However, other ideas are welcomed as well. 
Thanks!
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Off the top of my head (meaning it’s untested), I think you could do something like this in order to show that description only when widgets are not present:
if( !dynamic_sidebar( 'my_sidebar' ) ){
echo wp_sidebar_description( 'my_sidebar' );
}
(Of course, I think you could also just write whatever you want in place of the description function).
Hope that helps! 
Chris
Hmm… that would be exactly what I would need and makes sense (since there is a wp_widget_description), but I couldn’t find any reference of wp_sidebar_description.
Chris, are you making things up? 
Adrian
My bad, found it!
Doesn’t work yet, but doing more tests…
LATER EDIT : Yeah, your solution works like a charm, just needed an echo. Thanks! 
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Haha it seems to be missing from the Codex, but I swear I’m not making it up!
lol
It’s located in widgets.php http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/widgets.php line 674

- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Oh sorry, after closer examination of the function, you have to print the result. I’ve edited my original code to show the correct version 
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
rubiqube said
LATER EDIT : Yeah, your solution works like a charm, just needed an echo. Thanks!![]()
You’re welcome! 
