Problem: I have a View of Users that should display information about only one User - the current logged-in User. However the View is currently showing all Users.
Solution: The Query Filter in this View requires you to use a shortcode attribute to pass in a User ID or IDs. If you do not pass in the ids shortcode attribute, all Users will be displayed. See shortcode-attribute.png.
You have added this View using a View widget in the Входящие и Исходящие widget panel (see cannot-use-widget.png). This will not work, because you cannot add a shortcode attribute to a View widget. Instead, you should use a Custom HTML widget to add this View in a wpv-view shortcode. Then pass the current User's ID into the Query Filter using the wpv-current-user shortcode and the users shortcode attribute:
[wpv-view name="saydbar-vkhodyashhie-i-iskhodyashhie" users="[wpv-current-user format='meta' info='id']"]
Relevant Documentation:
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-current-user
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 4 years, 9 months ago.
Assisted by: Christian Cox.