I am using the Woocommerce Wordpress plugin for an E-commerce site. I want to be able to set the site in a non-ecommerce mode, ie without the cart and checkout etc etc. I know there is a plugin you can buy that does this but I am trying to do this myself.

I suppose I have to make myself a child theme and in the function.php remove certain pages. I do not want to just hide them because a user could still browse to them. I would like to return a 404 on any E-commercey page even though the page really exists.

I could use wp_delete_posts but then when I go back to the Parent theme the pages are gone too. What do you advise?

1 Answer 1


Those page are just traditional pages in your WP backend. Each with a shortcode for content. So you could delete those pages or switch them to un-published or private. I don't think you'd need to delete any theme templates.. which don't exist anyway for things like "cart", "checkout", etc.

If that doesn't do it, consider the extension. If you spend more than 1-2 hours figuring this out, then the extension will have been worth it.

  • Thanks, is it possible to un-publish pages from functions.php?
    – Lucky Luke
    Jan 31, 2013 at 18:42
  • Why would you do that? Just go into the WordPress admin. Feb 1, 2013 at 4:08
  • Perhaps to make it automatic on choosing the child theme. But you're probably right, its not worth the time
    – Lucky Luke
    Feb 1, 2013 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.