How to display only some widgets of a sidebar?

If what you want is “to break up a sidebar over three containers”, then you don’t really need to rebuild dynamic_sidebar() to do it. There is a filter called dynamic_sidebar_params that can be leveraged to break up the sidebar. function add_closing($params) { $params[0][‘after_widget’] = $params[0][‘after_widget’].'</div><!– close wrapper-thing –>’; return $params; } add_filter( ‘dynamic_sidebar_params’, function ($params) … Read more