diff --git a/partials/content/header/main.php b/partials/content/header/main.php index 2612bd4..5dd9dae 100644 --- a/partials/content/header/main.php +++ b/partials/content/header/main.php @@ -27,10 +27,24 @@ if ( $menu_items and is_array( $menu_items ) ) : foreach ( $menu_items as $item ) { - $link = $item['link']; - $columns = $item['columns']; - $number_of_columns = $item['number_of_columns']; - $current_url = home_url( $_SERVER['REQUEST_URI'] ); + $link = $item['link']; + $columns = $item['columns']; + $column_count = count( $columns ); + $current_url = home_url( $_SERVER['REQUEST_URI'] ); + + switch ( $column_count ) { + case 1: + $number_of_columns = 'one column'; + break; + case 2: + $number_of_columns = 'two column'; + break; + case 3: + $number_of_columns = 'three column'; + break; + default: + $number_of_columns = 'one column'; + } ?>