<section class="g-625750ed" data-element-role="main" data-bs-keyboard="cd06caaf5615">
    <div class="g-b24e2866" id="elem-f3382b17838376da">
        <h2 class="g-5e158376 g-3acb753b" data-block-group="061d3a2" data-test-selector="de2948d">All categories</h2>
        <div class="g-d5f43b9d" id="elem-ffe07dfb8f107ab1">
            <?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-987d8312"
                    >
                        <span class="g-2b74fe9c g-bf1581e5">
                            <?php echo esc_html( $category->name ); ?>
                        </span>
                        <?php if ( ! empty( $icon ) ) : ?>
                            <span class="g-92c5765b">
                                <?php echo esc_html( $icon ); ?>
                            </span>
                        <?php endif; ?>
                    </a>
                <?php endforeach; ?>
                <?php endif; ?>
        </div>
    </div>
</section>