• I thought I’d take a moment to present you with an updated version of tzeldin88’s post on how to create a client portal for WordPress without buying a plug-in.

    If the following sounds like you, read this post:

    I am trying to build a wp site for a company that wants their clients to be able to login and see a restricted-access, personalized page of content, links, downloads, etc. Simple enough in the real world, but quite a challenge in wp, for a newbie anyway.

    Step-by-step Instructions:

    Step 1: Install Plugins:
    – Members (By Justin Tadlock)
    – Peter’s Login Redirect (By Peter)

    Step 2: Configure Plugins:
    – Settings -> Members : Make sure the following is selected:
    – – “Enable the role manager”
    – – “Enable the content permissions feature”
    – – “Enable the login form widget”
    – – “Enable the users widget”

    – > Users -> Add New Role : Create a role called “User” and make sure only “read” is selected under Capabilities.

    (you might be able to skip this step if not running 3.5)
    – Plugins -> Editor : Peter’s Login Redirect won’t appear in the menu if you’re using 3.5, so hack their files until they fix the issue
    – – go to: peters-login-redirect/wplogin_redirect.php
    – – find line 1472 and replace “$rul_required_capability” to “8”

    – Settings -> Login/Logout Redirect : under Specific Roles, select “User” and then enter “[variable]username[/variable]” as the URL

    Step 3: Create a page template

    – I personally use Advanced Code Editor, which makes editing code very easy in WordPress. From Appearance -> Editor select “Create New File”

    – Name it “Login”

    – Enter in the following:

    <?php
    /*
    Template Name: Client Portal
    */
    ?>

    Then insert your theme elements. Make sure to include this tidbit somewhere as well:

    <?php
    global $current_user;
    get_currentuserinfo();
    $page = get_page_by_title($current_user->user_login);
    _e($page->post_content);
    ?>

    The following, however, did not work for me, so I actually just used the widget.
    Here’s a link on how to create a widget area.
    Note: Some have found success by deleting: _e($page->post_content);

    – Create a new page and make sure to select “Login” as the template.

    Step 4: Now, what about clients and their pages?

    – Create a user account for each client and set their role as “User”

    – Create a page for each user. Make sure the page is the same exact name as the client’s username.

    – Create a gallery on the page or whatever content you wish to deliver to them. Make sure to make the login page the parent page and that the page is hidden from prying eyes by setting content permissions.

    That should be it. There may or may not be huge wholes in what I just wrote, but… if not… celebrate.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Being a new to WP I lost you in step 3. I have create a new file called “Login” using Advanced Code editor. I cannot see the file (I’m using the Twenty Twelve template) to paste the code into.
    I can see the file was created in my /wp-content/themes/twentytwelve/ folder, but it is not a php file. I am using XAMPP as a localhost.

    Thank you in advance

    Hey there,

    Nice tutorial, thanks. Very easy to follow and has got me 90% of the way to where I want to be. Just wanted to know if you think something’s possible?

    I love the idea of redirecting to a username variable after login but wondered if I could create a menu item that takes you straight to the same place?

    Can you add variables into custom menus? i.e. have a button that says “home” but redirects each user to their specific page: https://www.website.com/users/username?

    Would be very appreciative of any suggestions on how best to accomplish this?

    cliffhilton

    (@cliffhiltongmailcom)

    I am lost here:

    Then insert your theme elements. Make sure to include this tidbit somewhere as well:

    <?php
    global $current_user;
    get_currentuserinfo();
    $page = get_page_by_title($current_user->user_login);
    _e($page->post_content);
    ?>

    The following, however, did not work for me, so I actually just used the widget.
    Here’s a link on how to create a widget area.
    Note: Some have found success by deleting: _e($page->post_content);

    – Create a new page and make sure to select “Login” as the template.

    So, when I login as the new user, it goes to to the page… but I get this:

    The requested URL /clienttest was not found on this server.

    Can you help? I believe this has to do with the code I quoted about. Much Thanks!

    For those looking for a pre-built solution that is proven in battle, you can check out WP-Client. There is a free Lite version in the WordPress repository, or the Pro version with more features can be found at WP-Client.com

    One plugin configures multiple areas of your WordPress installation and allows the site Administrator to easily create new Client Areas, Client Management Portals, Client Estimates & Invoices, Client File Upload Areas, or Private Staff Pages on the site by entering just a few data fields. Additionally, clients can upload/download secure files.

    @furiousfrog… Yes, WP-Client has the functionality you reference

    What if I need to include users from Oracle database instead of build in wordpress Mysql? I have got Oracle database, and I need to create web portal for users to make inquires etc.. Is it possible with WP-Client?

    @stryjxx: As per the Forum Welcome, please post your own topic. This topic is 8 months old and references a old version of WordPress.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Setting up a Free Client Portal for WordPress 3.5’ is closed to new replies.