A simple, powerful and independent e-commerce platform.
Sell anything with ease.

Redirect main shop page

The main shop page is often not a useful view when you have hundreds of products. You can redirect this page to another url or even to a 404 (page not found) if you want to disable that viewing option.

IMPORTANT NOTE: This snippet may interfere with the Product Search widget. The search results page will also be redirected to the new url.

		/**
 * Redirect Classic Commerce main shop page
 */

add_action('template_redirect', 'cc_shop_page_redirect');

function cc_shop_page_redirect() {

  if(is_shop()) {
    wp_redirect(home_url('/404/'));
    exit();    
  }

}
	
View Raw Code ID: 91049