[Resolved] Parametric search to filter a view by post status
This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi I was wondering if it is possible to use parametric search to filter a view by post status.
So...
I create a view that shows posts that are Published, Draft and Pending. The user can then use a filter on the front end to filter down the list to for example show only Draft Posts.
Where:
- You can adjust your number of post status with "values" and "display_values" attributes. Feel free to adjust yourselt.
2)
Edit your current theme's functions.php file and add the following code. To filter the posts by post status we need to use view's filter wpv_filter_query :