<?php
$tags = get_tags( 'orderby=name&order=ASC' );
$capital = '';
$i = 0;
$cols_number = 1;
$cut = ceil( count( $tags ) / $cols_number );
$cutter = $cut;
$letter_i = 0;
$output = '<div class="columnia">';
foreach ( $tags as $tag ) {
$i ++;
$firstletter = mb_substr( $tag->name, 0, 1 );
$firstletter = mb_strtoupper($firstletter);
if ( $firstletter != $capital ) {
$letter_i ++;
if ( $letter_i != 1 ) {
$output .= '</p>';
}
if ( $i > $cutter ) {
$output .= '</div><div class="columnia">';
$cutter = $cutter + $cut;
}
$capital = $firstletter;
}
$term = get_term_by( 'id', (int) $tag->term_id, 'post_tag' );
$output .= '<p class="p00"><a href="' . get_term_link( (int) $tag->term_id, 'post_tag' ) . '">' . $tag->name . '</a>';
}
echo $output . '</p></div>';
?>
$tags = get_tags( 'exclude=2,4&orderby=name&order=ASC' );