• Resolved tarundeology

    (@tarundeology)


    Hello! I used Tonal theme from wp repository which has already support Infinite scroll from Jetpack. I want to change the homepage to show my featured products (woocommerce) instead of posts. How do I use infinite scroll for products? This is my query:

    <?php
    			$my_query = new WP_Query( array(
                    'post_status' => 'publish',
                    'post_type' => 'product',
                    'meta_key' => '_featured',
                    'meta_value' => 'yes',
                    'posts_per_page' => 10
                ) );
    
                if ($my_query ->have_posts()) : while ($my_query ->have_posts()) : $my_query ->the_post();
            ?>
                <p>Products thumbnail and description here</p>
            <?php
                endwhile;
                endif;
            ?>

    Currently it shows 10 products with “Older Posts” link at the bottom of last product. I try to make the page load more products as user scroll down. Is it possible to use jetpack’s infinite scroll for products query like this? Please help!!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Tonal Jetpack's Infinite Scroll for Custom Post Type (Product – Woocommerce)’ is closed to new replies.