Problem:
The issue here is that the user wanted to filter his parametric search view by his users i.e authors.
Solution:
The solution is that you will need 2 views and a custom filter on your view.
First you will need to create a view that will list the Authors ID.
Example of the author ID view
[wpv-items-found] <!-- wpv-loop-start --> <wpv-loop>[wpv-item index=1][wpv-user field="ID"][wpv-item index=other],[wpv-user field="ID"]</wpv-loop> <!-- wpv-loop-end --> [/wpv-items-found]
On an important note that for the Author ID view you will need to use some javascript to strip the white spaces from the view. So add this to the JS section.
jQuery("#wpv_control_select_post_author > option").each(function () { this.value = this.value.trim(); });
Then you will need the Author Name view.
[wpv-items-found] <!-- wpv-loop-start --> <wpv-loop>[wpv-item index=1][wpv-user field="nickname"][wpv-item index=other],[wpv-user field="nickname"]</wpv-loop> <!-- wpv-loop-end --> [/wpv-items-found]
Finally on our view with the parametric search view you will create a custom filter like this.
<label>[wpml-string context="wpv-views"]Post Author[/wpml-string]</label> [wpv-control-postmeta field="post_author" type="select" source="custom" url_param="author-filter" values="[wpv-view name='list-author-id']" display_values="[wpv-view name='list-author-name']"]
Then under the query filter you will click "Add A filter" and then add the filter for author and set it to be filtered by a URL parameter
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 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)