logo

This is an old version of this answer!

Return to the current answer
Hello,

Wordpress mantain globals array of variables that contains a lot of useful informations.
There are also a lot of accessible less documented functions.

You can access widgets information with:
$wp_registered_sidebars
$wp_registered_widgets


I think that the right function for you is
wp_get_sidebars_widgets(false);


You can call it anywhere in your theme. It returns an array that you can inspect with a:
print_r(wp_get_sidebars_widgets(false));


There is a nested array (the second) that contains the sidebars list and the active widget for each of them.

Max | 12/14/09 at 7:16am

This is an old version of this answer!

Return to the current answer