In addition to 3 public pages, my site has 20 private pages, each of which are built for an individual customer. I want a user to be able to come to a public page, enter a customer code, and display the appropriate private page for that code. I don't want to use a dropdown or list because I don't want the other 19 private pages to be visible. Any ideas on how I can do that?
In addition to 3 public pages, my site has 20 private pages, each of which are built for an individual customer. I want a user to be able to come to a public page, enter a customer code, and display the appropriate private page for that code. I don't want to use a dropdown or list because I don't want the other 19 private pages to be visible. Any ideas on how I can do that?
Share Improve this question asked Oct 18, 2018 at 18:11 TMcKTMcK 11 bronze badge 4 |1 Answer
Reset to default 0Welcome to WPSE. Based on the additional information you provided, static pages with the list of users changing only once per year, I would recommend simply using the built-in "Password Protected" publishing option.
The Publish metabox (typically in the top right corner of the page editor) has a few options beyond the default public visibility. Simply click "edit" to expand the options. See screenshot attached.
Each page published this way can have a unique password that is only shared with the user needing to view the content.
get_the_content()
so collecting the password before the page loads (and sending via POST or GET) would be difficult at best. – jdm2112 Commented Nov 1, 2018 at 19:36