Problem:
I would like to know if it is possible to create my own mysql query to query posts and postsmeta tables and generate the proper output.
Solution:
I suggest you try with filter hook wpv_filter_query:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
For example,
1) Setup a post view, query posts, without any filter.
2) use "wpv_filter_query" to trigger a custom PHP function, in this PHP function, use your custom SQL query to get those specific post IDs, then pass the value as parameter "post__in" of query
Relevant Documentation:
https://developer.wordpress.org/reference/classes/wp_query/#post-page-parameters
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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 4 replies, has 2 voices.
Last updated by 4 years, 11 months ago.
Assisted by: Luo Yang.