display product’s category static slider name and image in loop wordpress

Question

I try to convert a category static slider in my home page for woocommerce but I don’t know use which loop or function to do that, here is my code:

<div class="row mt-3 mb-5">
                <div class="col-12">
                    <div class="category-section dt-sn dt-sl">
                        <div class="category-section-title dt-sl">
                            <h3>More Than 3000 products</h3>
                        </div>
                        <div class="category-section-slider dt-sl">
                            <div class="category-slider owl-carousel">
                                <div class="item">
                                    <a href="#" class="promotion-category">
                                        <img src="./assets/img/category/notebook-computer.png" alt="">
                                        <h4 class="promotion-category-name">Electronics</h4>
                                        <h6 class="promotion-category-quantity">150</h6>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="#" class="promotion-category">
                                        <img src="./assets/img/category/lifeline-in-a-heart-outline.png" alt="">
                                        <h4 class="promotion-category-name">Beauty</h4>
                                        <h6 class="promotion-category-quantity">620</h6>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="#" class="promotion-category">
                                        <img src="./assets/img/category/repair-tools.png" alt="">
                                        <h4 class="promotion-category-name">Tools</h4>
                                        <h6 class="promotion-category-quantity">310</h6>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="#" class="promotion-category">
                                        <img src="./assets/img/category/hanbok.png" alt="">
                                        <h4 class="promotion-category-name">Clothes</h4>
                                        <h6 class="promotion-category-quantity">1000</h6>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="#" class="promotion-category">
                                        <img src="./assets/img/category/sofa.png" alt="">
                                        <h4 class="promotion-category-name">Home Appliance </h4>
                                        <h6 class="promotion-category-quantity">615</h6>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="#" class="promotion-category">
                                        <img src="./assets/img/category/school-material.png" alt="">
                                        <h4 class="promotion-category-name">Art</h4>
                                        <h6 class="promotion-category-quantity">60</h6>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
0
Mehrdad Hosseini 2 months 0 Answers 10 views 0

Leave an answer