Basic password protection without using users or roles
-
Hi. Before anyone tells me to “Google” this and try one of the many plugins out there – let me explain. 🙂
I’m using WooCommerce, and want to be able to password protect products (or preferably whole categories if possible), but without using the Users & Roles functionality build into WP(because I need anonymous guests to be able to enter the password too).
I’ve tried the standard post password protection build into WP, but all that does is block the product’s description from showing up (i.e. the body of the “post”), but it doesn’t stop you from seeing the product image, details, etc (and in fact you can still purchase the product too).
I’ve gone down the road of writing something myself (basically I included a custom attribute in any page I wanted protected, and then customised the page template’s PHP code to require a password before displaying the page, but my attempts (so far) aren’t working 100% because they screw with the cart/checkout process (I think it’s interrupting the posted form data or something).
Any ideas?
Thanks
Dave
- The topic ‘Basic password protection without using users or roles’ is closed to new replies.