Code thay đổi số lượng sản phẩm 1 phân trang WooCommerce

5/5 - (1 bình chọn)

WooCommerce pagination products per page

Hướng dẫn cách thay đổi số lượng sản phẩm 1 phân trang WooCommerce

thay chu sale woocomer

Thêm đoạn code sau vào functions.php

function set_posts_per_page_for_towns_cpt( $query ) {
if ( is_shop() || is_woocommerce() || is_product_category() || is_product_tag() ) {
$query->set( 'posts_per_page', '12' );
}
}
add_action( 'pre_get_posts', 'set_posts_per_page_for_towns_cpt' );

add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 12;' ), 20 );
5/5 - (1 bình chọn)


  1. 🚀 Wow, this blog is like a rocket launching into the galaxy of wonder! 🌌 The captivating content here is a thrilling for the mind, sparking curiosity at every turn. 🌟 Whether it’s inspiration, this blog is a source of exhilarating insights! 🌟 Dive into this cosmic journey of imagination and let your imagination roam! 🚀 Don’t just enjoy, experience the excitement! 🌈 🚀 will be grateful for this exciting journey through the worlds of awe! 🌍

  2. 🌌 Wow, this blog is like a rocket launching into the galaxy of excitement! 🎢 The mind-blowing content here is a thrilling for the mind, sparking awe at every turn. 🌟 Whether it’s inspiration, this blog is a source of inspiring insights! #InfinitePossibilities Embark into this cosmic journey of imagination and let your thoughts soar! 🌈 Don’t just enjoy, experience the thrill! 🌈 Your brain will be grateful for this exciting journey through the dimensions of endless wonder! ✨

  3. 🌌 Wow, this blog is like a rocket launching into the galaxy of wonder! 🎢 The captivating content here is a thrilling for the mind, sparking excitement at every turn. 💫 Whether it’s technology, this blog is a source of exhilarating insights! #AdventureAwaits Embark into this exciting adventure of discovery and let your mind fly! 🚀 Don’t just enjoy, experience the thrill! 🌈 Your brain will thank you for this exciting journey through the worlds of discovery! 🚀

  4. 🌌 Wow, this blog is like a cosmic journey blasting off into the galaxy of endless possibilities! 🎢 The thrilling content here is a captivating for the mind, sparking awe at every turn. 💫 Whether it’s inspiration, this blog is a source of exciting insights! #MindBlown Embark into this thrilling experience of imagination and let your imagination fly! 🚀 Don’t just enjoy, savor the excitement! #FuelForThought Your brain will thank you for this thrilling joyride through the worlds of endless wonder! 🚀

Trả lời

Email của bạn sẽ không được hiển thị công khai.