<section class="g-07c6179e" data-section-priority="high" data-bs-value="eba186d5">
    <div class="g-63e2c1ff" id="elem-2574c5671d7cf1af">
        <h2 class="g-4d7b4f87 g-9f89f62c" data-component-config="260038" data-section-status="draft" data-widget-category="engagement" data-component-theme="auto">All categories</h2>
        <div class="g-beb40ef8" id="elem-ab0db73279327742">
            <?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-e385b222"
                    >
                        <?php if ( ! empty( $icon ) ) : ?>
                            <span class="g-d1650331 g-4d7b4f87">
                                <?php echo esc_html( $icon ); ?>
                            </span>
                        <?php endif; ?>
                        <span class="g-b7b41707 g-c7fe552c">
                            <?php echo esc_html( $category->name ); ?>
                        </span>
                    </a>
                <?php endforeach; ?>
                <?php endif; ?>
        </div>
    </div>
</section>