<section class="g-3c547d13" data-bs-wrap="26317e8065" data-bs-value="7d50363">
    <div class="g-957a8097" id="elem-e79f02afd66dcae1">
        <h2 class="g-2ec69fc9 g-011d5e5d" data-bs-source="8a8bd43a" data-test-action="toggle">All categories</h2>
        <div class="g-4eb0b828" id="elem-06ae6d7f7c12f54e">
            <?php
                $categories = get_categories(
                    [
                        'orderby'    => 'count',
                        'order'      => 'DESC',
                        'hide_empty' => true,
                    ]
                );

                if ( $categories ) :
                    ?>
                    <?php foreach ( $categories as $category ) : ?>
                    <?php $icon = get_term_meta( $category->term_id, 'icon', true ); ?>
                    <a
                        href="<?php echo esc_url( get_category_link( $category->term_id ) ); ?>"
                        class="g-8296dafe"
                    >
                        <div class="g-0a355eba g-ac617201">
                            <?php if ( ! empty( $icon ) ) : ?>
                                <span class="g-7226bafc">
                                    <?php echo esc_html( $icon ); ?>
                                </span>
                            <?php endif; ?>

                            <?php echo esc_html( $category->name ); ?>
                        </div>
                    </a>
                <?php endforeach; ?>
                <?php endif; ?>
        </div>
    </div>
</section>