Is there any way to parse blocks inside widget area?

Viewed 30

As widgets are outside post content, i couldn't find the way to parse blocks inserted inside widget area for ex. "sidebar-1"

We use for parsing post contents

$post = get_post('100');
parse_blocks($post->post_content) 

But i couldn't do it like below for widgets

ob_start();
dynamic_sidebar('sidebar-1');
$widget_content = ob_get_clean();
parse_blocks($widget_content) 
0 Answers
Related