Woocommerce pagination problem June 15, 2022 by Tarik Billa Try $homepage_query->have_posts() instead of have_posts() in your if condition.