PHP Loop Statement into un-ordered list 3 columns

I currently have the following code. The code echos a list of categories contained within the WordPress database. The code is working correctly, however I need help styling it.

<?php
$regions = get_terms( $taxonomies, $args );

    ?>

    <h3>Regions</h3>

    <ul>
        <?php foreach ($regions as $region) {
           echo '<li><a href="' . esc_attr(get_term_link($region, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $region->name ) . '" ' . '><font color="#bf9764">' . $region->name.'</font></a></li>';
          }
         ?>
    </ul>

The output is showing a single unordered list but I wish to split this list into 3 equal columns. See example below.

1. Category 1 | 4. Category 4 | 7. Category 7
2. Category 2 | 5. Category 5 | 8. Category 8
3. Category 3 | 6. Category 6 | 9. Category 9

I’m terrible with CSS. Thanks for any help!

Read more here: PHP Loop Statement into un-ordered list 3 columns

Leave a Reply

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