This is an old version of this answer!
Return to the current answerHello,
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:
I think that the right function for you is
You can call it anywhere in your theme. It returns an array that you can inspect with a:
There is a nested array (the second) that contains the sidebars list and the active widget for each of them.
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_widgetsI 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





