WooCommerce
Infinite scrolling WooCommerce products with Ajax Load More
In this example:
Ajax Load More will display WooCommerce products on a custom landing page and product archive.
Announcement: We just released the WooCommerce add-on for Ajax Load More that offers automatic integration into existing WooCommerce shop templates with zero configuration.
View Add-on.
WooCommerce examples are viewable on our external demo site – click the links below to be taken directly to the shop pages with Ajax Load More and WooCommerce enabled.
Note: Adding Ajax Load More to WooCommerce shop pages may require direct modification of WooCommerce templates – read more about this in the blog post
The following shortcode was used to create the WooCommerce example.
[ajax_load_more woocommerce="true" posts_per_page="3"]
The following Repeater Template was used to create the WooCommerce example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
<li <?php post_class('product'); ?>> <?php /** * woocommerce_before_shop_loop_item hook. * * @hooked woocommerce_template_loop_product_link_open - 10 */ do_action( 'woocommerce_before_shop_loop_item' ); /** * woocommerce_before_shop_loop_item_title hook. * * @hooked woocommerce_show_product_loop_sale_flash - 10 * @hooked woocommerce_template_loop_product_thumbnail - 10 */ do_action( 'woocommerce_before_shop_loop_item_title' ); /** * woocommerce_shop_loop_item_title hook. * * @hooked woocommerce_template_loop_product_title - 10 */ do_action( 'woocommerce_shop_loop_item_title' ); /** * woocommerce_after_shop_loop_item_title hook. * * @hooked woocommerce_template_loop_rating - 5 * @hooked woocommerce_template_loop_price - 10 */ do_action( 'woocommerce_after_shop_loop_item_title' ); /** * woocommerce_after_shop_loop_item hook. * * @hooked woocommerce_template_loop_product_link_close - 5 * @hooked woocommerce_template_loop_add_to_cart - 10 */ do_action( 'woocommerce_after_shop_loop_item' ); ?> </li> |
Note: This repeater template was copied directly from the following WooCommerce template.
woocommerce/templates/content-product.php