Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

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.

share|improve this answer
    
Thanks, is it possible to un-publish pages from functions.php? –  Lucky Luke Jan 31 '13 at 18:42
    
Why would you do that? Just go into the WordPress admin. –  helgatheviking Feb 1 '13 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 '13 at 7:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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