Home › Forums › General Issues › $wp_registered_sidebars is showing an empty array? › Reply To: $wp_registered_sidebars is showing an empty array?
Hi @Haikbvn
Have you attempted to debug the code?
You are assuming that variable such as $wp_registered_sidebars hold the data, but what if they don’t?
A simple debug test is to dump the varaible:
print_r( $wp_registered_sidebars );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.