Count sidebar widgets, add header too?

I have a function which works great for the dock (in the footer).
I just copied everything over to get a header area too. But there is a problem with the width of the header area.
I have found out that if I use get_grid_number_from_widgets( ‘header’ ); instead of get_grid_number_from_widgets( ‘dock’ ); it will solve the problem. But creates a new one at the dock (footer). So how do I use this function for both?
I tried this without success:

get_grid_number_from_widgets( ‘dock’, ‘header’ );

Why doesn’t that work?
Here’s the complete function! Tried using ‘dock’, ‘header’ at both positions.

if (count($widths) == 0 || count($widths) != count_sidebar_widgets(‘dock’)) {
$widget_width = get_grid_number_from_widgets( ‘dock’ );

Read more here:: Count sidebar widgets, add header too?

Leave a Reply

Your email address will not be published. Required fields are marked *