CMS Mastering Development Wordpress

Make Jetpack infinite scrolling work with custom field sort

I tried to contact Jetpack but they wouldn’t help Hi, I have a custom field “view_count” for my WooCommerce products. When trying to sort an archive page by it , this code works: add_filter(‘woocommerce_get_catalog_ordering_args’, ‘custom_woocommerce_get_catalog_ordering_args’); function custom_woocommerce_get_catalog_ordering_args($args) {     $orderby_value = isset($_GET[‘orderby’]) ? wc_clean($_GET[‘orderby’]) : apply_filters(‘woocommerce_default_catalog_orderby’, get_option(‘woocommerce_default_catalog_orderby’));     if (!is_search()) {     […]