nelsonM-2
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 |
---|---|---|---|---|---|
View's filter options loose translation after first ajax refresh
Started by: nelsonM-2 in: Toolset Professional Support |
2 | 2 | 7 years, 1 month ago | ||
Creating a multi-condition AND/OR custom filter in a View
Started by: nelsonM-2
in: Toolset Professional Support
Problem: I would like to create a complex and/or condition in my View filters, but I can only select one AND/OR clause. Solution: While it's not possible in wp-admin, you would be able to achieve this type of filter using the wpv_filter_query API: add_filter( 'wpv_filter_query', 'fix_custom_and_or_query' , 99, 3); function fix_custom_and_or_query( $query_args, $view_settings, $view_id ) { $metaQuery = []; if( $view_id == 1234 ) { // change this to the correct View ID // uncomment to inspect the selected filters in $_POST or $_GET // error_log(print_r($_GET, true)); // error_log(print_r($_POST, true)); $someVar = $_GET['wpv-wpcf-some-slug']; if($someVar == 'abc') { // ** - sample conditional here based on the user-selected filters } // ** - code to create the correct meta query in $metaQuery goes here // then replace the original meta query with the updated meta query $query_args['meta_query'] = $metaQuery; } return $query_args; } Relevant Documentation:
|
2 | 9 | 7 years, 1 month ago | ||
Create a side bar affix with bootstrap and Toolset
Started by: nelsonM-2
in: Toolset Professional Support
Problem: Solution: Use the below package: It includes modules that you can apply on a dev site. It is a great help to achieve complex nested Views structures. This package is not included in our support range, but is an example of what can be achieved with complex structures and some custom code. |
2 | 5 | 7 years, 1 month ago |