How to remove WooCommerce Product lists and Pagination from Mainpage

Here is how to remove the WooCommerce Productlists and the pagination from Home, Index or the Mainpage:

Simply add this CSS to your Site. It hides the Products from the Main site but leaves it on Category sites…

.home .content-area > .site-main > .columns-4, .home .content-area > .site-main > .storefront-sorting {display:none; visibility: collapse;}


There is also some information with adding special classes etc but be aware that the CSS there is flawed as it removes the Products even from categories.

or this:

 * @snippet Remove Product Loop @ WooCommerce Shop
add_action( 'pre_get_posts', 'njengah_remove_products_from_shop_page' );

function njengah_remove_products_from_shop_page( $q ) {
   if ( ! $q->is_main_query() ) return;
   if ( ! $q->is_post_type_archive() ) return;
   if ( ! is_admin() && is_shop() ) {
      $q->set( 'post__in', array(0) );
   remove_action( 'pre_get_posts', 'njengah_remove_products_from_shop_page' );


* @snippet Remove "No products were found matching your selection" @ WooCommerce Loop Pages

remove_action( 'woocommerce_no_products_found', 'wc_no_products_found' );