Problem:
Client wants to create something like a dashboard page for users where they can see their own content or profile fields of that user.
Solution:
You have a View to show users on that My Account page.
You need to add a Query Filter to specify which user to display. You can't directly add a filter for "current user", you have to do it by specifying that the user ID is set by a shortcode attribute (by default the attribute is called users, but you can change this), see screenshot.
Now go back to where you insert the View and manually add the users attribute, and use a shortcode (which you can insert with the Fields and Views button) to provide the ID of the current user, which results in this:
[wpv-view name="akkaunt-informatsiya-o-vladeltse" users="[wpv-user field='ID']"]
(Note that you need to be careful with the single and double quotes.)
Relevant Documentation:
https://toolset.com/documentation/user-guides/passing-arguments-to-views/
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-current-user
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 4 replies, has 2 voices.
Last updated by 6 years, 4 months ago.
Assisted by: Nigel.