Tai Chang
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 |
---|---|---|---|---|---|
How to set video time limit of video custom field when uploading
Started by: Tai Chang
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 5 | 3 years, 6 months ago | ||
How to disable the search in view using blank?
Started by: Tai Chang
in: Toolset Professional Support
Problem: I would like to prevent search results from appearing until a custom search filter is added. Solution: Use our PHP Views Filter API wpv_filter_query_post_process to drop a View's results until some meta_query is added. The following custom code can be used as a template: /** * No initial results until a filter has been applied * Tests for one specific custom field search filter * Reference: https://toolset.com/forums/topic/how-to-disable-the-search-in-view-using-blank/ */ function tssupp_no_initial_results( $query_results, $view_settings, $view_id ){ $target_views = array( 123, 456 ); $field_slug = 'field-slug'; // you should not edit below this line if ( in_array( $view_id, $target_views ) ) { // blank search indicates just blank space in the filter $blank_search = isset($query_results->query['meta_query']) && sizeof($query_results->query['meta_query']) == 2 && $query_results->query['meta_query'][0]['key'] == 'wpcf-'.$field_slug && trim($query_results->query['meta_query'][0]['value']) == ''; // if there is no search term set, drop all results if ( !isset( $query_results->query['meta_query'] ) || $blank_search ) { $query_results->posts = array(); $query_results->post_count = 0; $query_results->found_posts = 0; } } return $query_results; } add_filter( 'wpv_filter_query_post_process', 'tssupp_no_initial_results', 10, 3 ); Relevant Documentation: |
2 | 5 | 3 years, 6 months ago | ||
Display custom video field not using URL
Started by: Tai Chang
in: Toolset Professional Support
Problem: The issue here is that the user's custom video fields are not displaying on the frontend with the embedded video player, rather they are just displaying the URL. Solution: In this Users case I saw that their video format was .MOV which is not one of the formats that the wordpress embedded player supports. To get a list of the supported video formats you can see the link below. |
2 | 8 | 3 years, 6 months ago | ||
View or archive display setting
Started by: Tai Chang in: Toolset Professional Support |
1 | 2 | 3 years, 6 months ago |