0

How to list all existing sidebars?

I want to show them all in the drop down list (so each item should have also the right value).

1 Answer 1

1

You can only gel list of registered sidebars, from variable $wp_registered_sidebars.

<?php
global $wp_registered_sidebars;
echo '<pre>';
print_r($wp_registered_sidebars);
echo '</pre>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.