Hi.
Im working on membership website.
Starting to read your documentation about creating user profile directory and user search. As i understand I can not create user Profile directory with search and filters due to some WP restrictions
https://toolset.com/documentation/user-guides/how-to-create-custom-searches-and-relationships-for-users/
I found it a bit complicated for Toolset beginners like me. I mean there are lots of WP plugins for membership websites with search and filter functionality that allow creation of User profiles with ease. Yes those plugins are not so feature rich as Toolset.
So my idea is to simplify Profile creation in Toolset.
- Administrator creates custom post type (names it "User profiles" or whatever) and connect this CPT to any Role. For Any new visitor registered to that role automatically generated a post within that CPT.
- Administrator can create any Custom Fields for the User Role
- All fields from that role are connected to generated CPT
- Any generated CPT will have title “Username” so all post titles will be unique.
- All registered users will have only one CPT generated automatically. To edit their profile CPT they need to edit their profile fields
Once assigned as user Profile CPT, those generated posts can be completely blank with no options. Their only purpose is to represent user directory with search and filters by custom fields in user profiles.
You can even restrict those CPT from deleting by any user (including admin) and the only way to delete is to disconnect those CPT from User roles or delete connected CPT by deleting user profile.
Yes, this is basically what most of those plugins do under the hood.
We decided to not do such feature in the GUI but publish how the structure looks so one can build that on its own.
Manually, or if you want this automated, with some hooks that fire the code to create the posts.
Actually the Document does exactly that but takes even away the Custom code, by letting the new user creating their own profile, smart solution.
I do not see why this should be automated, it would just take away the power from deciding what and when happens.
Of course, one could have an "option" wether to or not.
However, considering the size of Toolset this is out of scope, it would be a major part of (size) code that is there either active or not, incrementing the plugins for what you can do manually, or semi-automated (let the user do it) or fully-automated (hook the code that creates the content to Forms API cred_save_data() to execute it each time a form of that kind is submitted)
The story of that documentation starts with this very request.
It was decided that we instead of creating such feature will show how to build it.
I have hence to note the idea, but I think it may only be iterated in a farer future again.
Please let me know if something is unclear about it.
Hey Beda. Thank you for the reply.
I understand now.
Anyway I need help with user profile creation.
2 questions:
1. In the documentation you have provided I didnt find how user can edit their personnal info (in CPT). Attached example with this message.
2. I have URL heirarchy "mysite/specialists/john-smith" Where "mysite/specialists/" is users directory. And "mysite/specialists/john-smith" is profile URL of a user.
The question is how to make a dynamic menu item like "My Profile" with profile url for every logged in user?
To let the user edit their content you'd create a Edit Form that edits the post the user created as as profile.
It's a classic Post Edit Form.
https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/
https://toolset.com/documentation/user-guides/creating-cred-forms/
To create dynamic URLs you use ShortCodes
You have to match your output with a ShortCode that returns what you want.
If the URL is:
mysite/post_type/post_title
Then you can do:
[wpv-bloginfo show="url"]/[wpv-post-type]/[wpv-current-user info="login"]
That produces the URL with dynamic data.
You can almost use any ShortCode there, just be careful with nested ShortCodes and many attributes, in those cases sometimes the apostrophes need to be changed to single apostrophes in the ShortCodes