@shanelh – I’m fairly new at WP myself, and I have not yet actually implemented this strategy yet on a site, but i did prove the concept to myself and still plan to use it. I’d be happy to give more detail if you still need it, but what specific part do you need help on? For the Custom Page Template: the idea is that you need to add that chunk of PHP code…
$page = get_page_by_title($current_user->user_login);
only on your “client-portal” page, so:
– i basically just made a copy of my normal page.php, saving it as “client-portal.php”.
– in the comments at the very top, i added “Template Name: ClientPortal” (so wp admin is aware of this new template).
– added that code just before “the loop” [the “if (have_posts())…” section ].
– in wp admin, create a page “Client Portal” to act as the Parent to all the client pages.
– in wp admin, create a page “JoeSmith” (whatever your client’s WP username is… this is VITAL), and in the sidebar, for the Template dropdown, choose your new ClientPortal template. i also set the Parent dropdown to the “Client Portal” page, just for proper nesting.
I’d love to check out your website if you wouldn’t mind posting it.
I am researching creating a private area on a wordpress site.
I’m also interested in making a more custom registration form beyond the default one. I’ve been looking into Registration Plus, but I have been reading that it is very unstable and other options look thin.
Has anyone tried or done interfacing this with some photo/video gallery plugin or theme, so each client would have their own (private) photo+video gallery (from self-hosted files)?
I (believe I) followed the above instructions, and right now, upon login, my test client is redirected to the Client Portal page (parent). Is there a way I could have each client redirected to their own (child) page? Or am I missing something?
@adbl — I haven’t tried this with a photo gallery. Also: the logged-in client will be redirected to the client-portal page (url), but that page should actually display the post of the child page. It gets the client’s Username and uses that *exact* value to find a page with a matching Title. If you’re not seeing the content of the child page, you might not have perfectly matching Username and Title.
Not sure why, but no matter what I did, the child content was displaying on the parent “portal” page. But only if the client was logged in. Also the content was displaying all the way above the <link> elements of the head of my document.
I followed all the instructions and it works but with a few minor problems:
1. There is no login box on the Client-portal page so that the client has to find the login link elsewhere on the page (on my current theme the login link is very subtle and is located in the footer).
– Is there a way of adding a box for username and one for password on the client page so that it is easier for the client to log in?
2. Once logged in, the content on the client’s page is ADDED to the client-portal page instead of replacing it. So even after logging in the client sees the text from the previous client-portal page on their own client page.
– Is there a way to make the client page completely replace the client-portal page instead?
I have managed to solve the first point by viewing the source of the default WordPress login page and copying and pasting the code into my client-portal page.
This gave me the username and password boxes to enable the client to login.
However, I am still stuck with the problem I described in my second point. This will confuse the client – after successfully logging in they are presented again with the login boxes even though the contents of their client page is added below.
If I could get rid of those login boxes after the client has logged in it will be perfect.