Skip Navigation

[Resolved] Creating Client Portal – Would like to associate user(s) with content, etc.

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1615943
client-portal-site-mockup-01.jpg

-----Tell us what you are trying to do?-----

I would like to create a client portal site where my clients can log in and see projects associated to them, the status, download files, etc. So, I've started by creating two custom post types ("projects" and "clients"). What I envisioned was using post relationships to connect various projects to clients.

Then I was hoping to create users (the actual clients) and assign them to only see content from their associated "clients" (custom post type) and the related projects (using post-relationships). Plus, it'd be nice if I could allow multiple users (perhaps two or three individuals from the same company who view the same client content).

-----Is there any documentation that you are following?-----

I've read several topics/discussions on here, but none are quite sorting it out for me as well as I hoped. Maybe it's not possible or as simple as I imagined it would be. So far I've gathered that possible solutions involve making content private so that users could only see the items created by them - and then I would need to go in and set the specific content as authored by that user.

But then I'd be stuck to only that specific account being able to see the content (plus me as admin I suppose).

I guess I was really hoping for a solution that actually tied content to users in the same or similar way that Toolset allows post-relationships between custom post types. Is anything like that possible?

-----Is there a similar example that we can see?-----

I was going for something that looks a bit like the Trello/Kanban style visually. I'm attaching a screenshot of one of my mockup pages.

-----What is the link to your site?-----
hidden link

#1616461

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Welcome to Toolset support and I'd be happy to assist.

Based on what you've shared, the requirement can be divided into two main parts:

1. Connecting users with posts:

Since Toolset post relationships feature can be used to link two post types but not user and a post type, you'll need to use an anchoring post type for this, as explained at:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

In summary, whenever a new user would register on a website, he/she will need to create exactly one "User Profile" post where he/she is the author of that post.

This "User Profile" post will allow you to link that user with other post types too.

Once you'll have the information about the current user's "User Profile" post, you'll be able to get information about all the related posts in different post types.

2. Controlling team access for the projects:

For dynamically structuring this, where the web site's admin has to do minimal manual work, you can consider:

a). Post Types:

- User Profiles
- Teams
- Projects

b). Post Relationships:

- Teams <-> User Profiles
A many-to-many relationship as one team can have multiple users and likewise, one user can be part of multiple teams.

- Projects <-> Teams
A many-to-many relationship as one project can have multiple teams working on it and likewise, one team can be working on multiple projects.

Through this structure, you'll be able to add conditional checks to show information about a particular project only if the current user is the author of that project post, or is part of a team that is attached to that project:
https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.