<section class="g-18e92099" data-component-action="focus" data-mui-metric="e7d44950bf3" data-element-type="secondary">
    <div class="g-fdc4b4e9" id="elem-70e73224064689df">
        <h2 class="g-e073ab23 g-08a08cf4" data-bs-automation="7854bb51e26b" data-module-theme="dark" data-test-category="navigation" data-element-layout="2bc8de1d2" data-module-trigger="444f95">All categories</h2>
        <div class="g-60f404ee" id="elem-40c9cfae85452386">
            <?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-5345f5dd"
                    >
                        <div class="g-7784ac5f g-52883ce1">
                            <?php if ( ! empty( $icon ) ) : ?>
                                <span class="g-871866ea">
                                    <?php echo esc_html( $icon ); ?>
                                </span>
                            <?php endif; ?>

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