Prevent pagination loading
-
I am trying to prevent the pagination numbers from being visible on my site, and I have succeeded with this css:
.woocommerce-result-count,
.woocommerce-ordering {
display: none;
}The problem is that when I load the site, for a fraction of a second I still see the numbers, which then disappear. To avoid this little problem I tried with some actions (see below) but I don’t get any results. Do you have any idea how I could solve this problem? Thank you
// remove default sorting dropdown in StoreFront Theme
add_action(‘init’,’delay_remove’);
function delay_remove() {
remove_action( ‘woocommerce_after_shop_loop’, ‘woocommerce_catalog_ordering’, 10 );
remove_action( ‘woocommerce_before_shop_loop’, ‘woocommerce_catalog_ordering’, 10 );
}
// Remove the result count from WooCommerce
remove_action( ‘woocommerce_before_shop_loop’ , ‘woocommerce_result_count’, 20 );
remove_action( ‘woocommerce_before_shop_loop’, ‘storefront_woocommerce_pagination’, 30 );
remove_action( ‘woocommerce_after_shop_loop’, ‘woocommerce_pagination’, 30 );The page I need help with: [log in to see the link]
- The topic ‘Prevent pagination loading’ is closed to new replies.