So if you really want to try it out, you need to search through Views code / files to find the hook OR To get to know about which Views Hooks are executed on the page (frontend or backend), I suggest you a good way to detect those, please use following plugin & its addon:
- Debug Bar: https://wordpress.org/plugins/debug-bar/
- Debug Bar Actions and Filters Addon: https://wordpress.org/plugins/debug-bar-actions-and-filters-addon/
1. On which particular page, which particular section and which particular table column or field is not sorting correctly? Please add some screenshot as well.
2. Try to remove and re-add the filters / query filters again (specially the one having issue). Sometimes re-adding filters resolves such issues. OR please try to create a new basic test View with Table sort and see if filters work correctly in it?
It seems my problem is I need to sort a table based on a column filled by several fields, based on custom post type.
For instance post type A date field is called wpcf-A-date, and post type B date field is called wpcf-B-date.
So when filling the view for both custom post types A and B, I would need the column heading to be something like
Views cannot handle double Ordering or Sorting by 2 custom fields. And this is limitation even if Custom Fields comes from one CPT or from 2 CPTs. A feature request was filed recently for having ordering / sorting by 2 custom fields.
The main issue is the level of complexity in this type of behavior which Views cant handle as of now. So I am afraid this won't be possible at moment.
If I understand well, the data stored while making the sorting is set by the wpv-heading shortcode, and it has nothing to do with the content of the cells. Wouldn't it be possible to have more latitude to choose the data used for the sorting ? For instance with a hook or function ?
Thank you.
So if you really want to try it out, you need to search through Views code / files to find the hook OR To get to know about which Views Hooks are executed on the page (frontend or backend), I suggest you a good way to detect those, please use following plugin & its addon:
- Debug Bar: https://wordpress.org/plugins/debug-bar/
- Debug Bar Actions and Filters Addon: https://wordpress.org/plugins/debug-bar-actions-and-filters-addon/