Any reason this code does not work in the admin section (specifically when ajaxing but the issue persists on other pages) of WordPress but works just fine

$content = ob_get_clean();

print_r($content); // nothing 

the sidebars are set from what I see print_r($GLOBALS['wp_registered_sidebars'])

        [frontpage_widgets] => Array
                [name] => Frontpage Widgets
                [id] => frontpage_widgets
                [description] => Widgets for the Frontpage Widgetspage
                [class] => 
                [before_widget] => 

Is there something preventing the widgets from displaying in the admin section?

Read more here: dynamic_sidebar() returns false in admin section


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: