jesseM-3
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Views Result within a result
Started by: jesseM-3
in: Toolset Professional Support
Problem: I would like to get the value of a custom User field in PHP, and use that value in the Query Filter shortcode arguments of a View. Then I would like to use the results of that View in the shortcode arguments of another View. I'm using types_render_usermeta and render_view, but the results are not what I expect. Solution: The APIs types_render_usermeta and render_view are designed to output content, and can include extra markup and syntax that will not work correctly in filters. Instead of using types_render_usermeta to get the value of a custom field, use the WordPress API get_user_meta, since it will return the raw value without any extra markup. Instead of relying on the results of render_view as an argument, access the data more directly using get_view_query_results. Relevant Documentation: |
2 | 3 | 6 years, 8 months ago |