davidH-33
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 |
---|---|---|---|---|---|
Custom shortcode in Elementor shortcode or text widget
Started by: davidH-33 in: Toolset Professional Support |
|
2 | 3 | 3 years, 6 months ago | |
Error when "check_if_allowed_by_user_role" shortcode is displayed without log in
Started by: davidH-33 in: Toolset Professional Support |
|
2 | 5 | 3 years, 6 months ago | |
Displaying view that shows only items related to user role of logged user
Started by: davidH-33 in: Toolset Professional Support |
|
3 | 8 | 3 years, 7 months ago | |
Frontend filtering for Event – filter each day based on CPF Datetime
Started by: davidH-33
in: Toolset Professional Support
Problem: Solution: [wpv-control-postmeta values=",23/07/2021,24/07/2021,25/07/2021" display_values="Every day,Friday 23.07.2021,Saturday 24.07.2021,Sunday 25.07.2021" field="wpcf-screening-date" type="select" source="custom" url_param="wpv-day"]> add_filter( 'wpv_filter_query', 'default_this_month_inclusive', 10, 3 ); function default_this_month_inclusive ( $query, $view_settings, $view_id ) { if( $view_id == 1784 ) { $selected_start = 0; // strtotime('0:00:00'); $selected_end = 9999999999; // determine if user has selected a start or end date, and destroy those meta query items if ( isset($query['meta_query']) ) { foreach($query['meta_query'] as $key => $meta) { if(isset($meta['key']) && $meta['key'] == 'wpcf-screening-date'){ // get a timestamp that represents 12:00 am on the event start date $selected_start = strtotime(date($meta['value']) . ' 0:00:00'); unset($query['meta_query'][$key]); } if(isset($meta['key']) && $meta['key'] == 'wpcf-screening-date'){ // get a timestamp that represents 11:59:59 pm on the event end date $selected_end = strtotime(date($meta['value']) . ' 23:59:59'); unset($query['meta_query'][$key]); } } } $args = array( 'relation' => 'AND', array( 'key' => 'wpcf-screening-date', 'value' => $selected_end, 'compare' => '<=', 'type' => 'numeric' ), array( 'key' => 'wpcf-screening-date', 'value' => $selected_start, 'compare' => '>=', 'type' => 'numeric' ) ); // add these arguments to your meta query $query['meta_query'] = isset($query['meta_query']) ? $query['meta_query'] : []; $query['meta_query'][] = $args; } return $query; } Relevant Documentation: |
|
2 | 5 | 4 years, 5 months ago | |
Filter stops working when displayed on mapped subdomain
Started by: davidH-33 in: Toolset Professional Support |
|
2 | 3 | 5 years, 3 months ago |