Support » Plugin: WooCommerce » Disable "shop" page

  • Hello,

    while trying to disable “shop” page I did the following:

    1. deleted “shop” page in admin panel
    2. in woocommerce settings, I clicked “x” for “shop” page, so that select element is empty and saved settings
    3. tried to remove code from almost all files in “plugins/woocommerce/templates” just to see if I can get empty page

    No matter what I do “shop” page was there with it’s content.

    I ended up updating woocommerce.php file in root of my theme, where I did this:

    // If we are on /shop force 404
    if ( is_shop() ) {
      global $wp_query;
    } ?>

    Right now this is working, I mean, when I try to open “shop” page I really get 404.php template rendered and actual 404 status returned in network tab.

    Since this is my first theme with woocommerce support I am wandering if this is the best way to achieve the thing I need? Not sure if there is some functionality on other pages that will stop working because of “shop” page not being there.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Roy Ho


    If you remove page from the menus, it is already hidden from public so why would that not work? Unless you’re afraid either someone guesses it or search enqines pick it up?

    So the ultimate question here is why are you trying to do this. Without knowing the answer to this, it is hard to suggest anything.

    The client said so. I think that answers both your questions. 🙂

    There are different pages that lead to a product where they can add it to cart.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable "shop" page’ is closed to new replies.