I am trying to achieve the following
Customer has their profile page and can edit it etc
I would like anyone with the URL to view a customers profile details by entering a pin code (prompted) after entering the URL in a browser. I have tried with ultimate member plugin but no luck. Any suggestions?
I am trying to achieve the following
Customer has their profile page and can edit it etc
I would like anyone with the URL to view a customers profile details by entering a pin code (prompted) after entering the URL in a browser. I have tried with ultimate member plugin but no luck. Any suggestions?
Share Improve this question asked Jan 7, 2020 at 7:40 CamnuckCamnuck 1 1- WordPress supports per-page passwords (Status & Visibility, Visibility Password Protected) - you could hook into that? – Rup Commented Jan 7, 2020 at 9:45
1 Answer
Reset to default 0Users aren't stored as a post type like most other content in WordPress so you can't use the per-page password feature in core. You can add a custom meta field to Users for the pin and then add some functions for displaying/handling the form, checking if the pin is valid, and so on.
Another option would be to use a custom post type to implement the public user profiles. With this option you'd be able to leverage the content password features in core. You'd set the pin for the custom user profile post type, show the form using get_the_password_form()
, and check for the password using post_password_required()
.
Reference Using Password Protection on the Wordpress documentation site for more information.