Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Jake Bolton
Jake Bolton
1,956 Points

Private Client Area Plugin

Hey all,

Not a total newbie to Wordpress but I had a request from a client to build a private client area into her Wordpress site.

This doesn't necessarily need to have a secure log-in, but I'm just trying to find some resources to help me set this up.

If anyone could point me in the right direction I'd be over the moon.

Many thanks, Jake

4 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

You can make pages private so someone has to login to see them. Then you could have a whole series of private pages. With just a little template tweaking you could also have a custom menu that only appears when someone is logged in to the site.

Jake Bolton
Jake Bolton
1,956 Points

That sounds great, thank you very much.

The process I would ideally like would be:

  1. One landing page for all clients with a log-in form.

  2. When a client page logs in they arrive a landing page containing only content relevant to them.

I've seen something that could work here: http://wordpress.org/support/topic/setting-up-a-free-client-portal-for-wordpress-35?replies=5

Though I'm not sure if this would be a stable solution, would you have any thoughts?

Many thanks in advance. Jake

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

You can definitely do this with native functionality. Try playing around with creating some private pages. Do you know how to edit template files?

If so, you can use code like this to wrap your private navigation in if you need:

<?php
if ( is_user_logged_in() ) {

   // Create a menu in the admin area
    wp_nav_menu( $args );

} 
?>

Also see this for help with the navigation: http://codex.wordpress.org/Navigation_Menus

If it works, please write a blog post or post back up here what you did and how it worked for you! I would love to be able to reference that when people ask to do similar things.

Thanks!!!