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

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>';
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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