Sidebars Array not loading

Support General Sidebars Array not loading

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1474
    MaxellMaxell
    Participant

    Dear Support,

    I have to load list (array) of all registered sidebars, if I load the following code:

    print_r($GLOBALS['wp_registered_sidebars']);

    in any other page for instance in header.php it shows the whole list of available, but if I use the same code in my custom fields file, it only shows 1 (the first sidebar) and the rest are not available, I have tried setting

    global $wp_registered_sidebars;
    print_r($wp_registered_sidebars);

    but it also shows only 1 from the array... Can you please help here..

    thanks

    #1476
    MaxellMaxell
    Participant

    Never mind.. I have found that $wp_registered_sidebars; only works within hooks.. I have found the solution..

    regards

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Sidebars Array not loading’ is closed to new replies.