marcB-6
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 |
---|---|---|---|---|---|
Add custom option in sorting controls dropdown
Started by: marcB-6
in: Toolset Professional Support
Problem: I would like to add a custom sorting option to the Ascending / Descending date sort filter. Solution: Use JavaScript to prepend the option on page load and select it by default. Use the front-end events button to insert code that will prepend the option, disabled, when pagination is performed or filters are modified. |
3 | 16 | 7 years, 2 months ago | ||
pre-select views filter radio button not filters data
Started by: marcB-6 in: Toolset Professional Support |
2 | 5 | 7 years, 2 months ago | ||
[wpv-post-modified format=”d-m-Y h:i:s A (T)”] not displaying last modified date
Started by: marcB-6
in: Toolset Professional Support
Problem: Solution: [wpv-post-date type="modified"] Relevant Documentation: |
2 | 3 | 7 years, 2 months ago | ||
not working with wpv-conditional
Started by: marcB-6
in: Toolset Professional Support
Problem: Solution: |
2 | 13 | 7 years, 2 months ago | ||
Show error message below fields in login,forgot password & reset password forms
Started by: marcB-6 in: Toolset Professional Support |
2 | 3 | 7 years, 2 months ago | ||
relevanssi plugin not displaying “Title,body custom fields” option in all view
Started by: marcB-6
in: Toolset Professional Support
Problem: Solution: |
2 | 7 | 7 years, 2 months ago | ||
Ref : Custom search for Upcoming Events & Previous Events Using Dropdown
Started by: marcB-6
in: Toolset Professional Support
Problem: Upcoming events: Solution: add_filter( 'wpv_filter_query', 'special_end_filter', 999, 3 ); function special_end_filter( $query_args, $view_settings, $view_id ) { $the_end = isset($_GET['custom-end-filter']) ? $_GET['custom-end-filter'] : ''; if( ($view_id == 290 || $view_id == 309 ) && $the_end ) { // your view id if( $the_end == '1' ) { //upcoming $compare = '>'; $order = 'ASC'; $field_slug = 'wpcf-start-date';// Start date field slug } else { // previous $compare = '<'; $order = 'DESC'; $field_slug = 'wpcf-end-date'; // End date field slug } $args = array( 'relation' => 'AND', array( 'key' => $field_slug, 'value' => strtotime('23:59:59'), 'compare' => $compare, 'type' => 'numeric', ) ); $query_args['order'] = $order; $query_args['meta_query'] = isset($query_args['meta_query']) ? $query_args['meta_query']: ''; $query_args['meta_query'][] = $args; } return $query_args; } ==> Please make sure to replace View ID, start date and end date field slugs in the above code. 2. And in View settings, set Ordering - Order by Eventdate field, please see attached screenshot. |
2 | 6 | 7 years, 2 months ago | ||
Auto-insert paragraphs in content template not adding paragraph
Started by: marcB-6 in: Toolset Professional Support |
2 | 5 | 7 years, 2 months ago | ||
Load More Button Toolset
Started by: marcB-6 in: Toolset Professional Support |
2 | 3 | 7 years, 2 months ago | ||
Display filename from url saved in custom field
Started by: marcB-6
in: Toolset Professional Support
Problem: Solution: |
2 | 7 | 7 years, 2 months ago | ||
Custom search for Upcoming Events & Previous Events Using Dropdown
Started by: marcB-6
in: Toolset Professional Support
Problem: I would like to include a custom search filter that allows users to filter by past events or future events. This is the only filter I would like to include, and I want the results to update with AJAX. Solution: <select name="custom-end-filter" id="custom-end-filter" class="js-wpv-filter-trigger form-control"> <option value="">All</option> <option value="1">Upcoming</option> <option value="2">Past</option> </select> 2. Add the following custom code to functions.php: add_filter( 'wpv_filter_query', 'special_end_filter', 99, 3 ); function special_end_filter( $query_args, $view_settings, $view_id ) { $the_end = isset($_GET['custom-end-filter']) ? $_GET['custom-end-filter'] : ''; if( $view_id == 12345 && $the_end ) { $compare = $the_end == '1' ? '>' : '<'; $args = array( 'relation' => 'AND', array( 'key' => 'wpcf-the-end', 'value' => strtotime('23:59:59'), 'compare' => $compare, 'type' => 'numeric' ) ); // add these arguments to your meta query $query_args['meta_query'] = isset($query_args['meta_query']) ? $query_args['meta_query'] : []; $query_args['meta_query'][] = $args; } return $query_args; } Replace 12345 with your View's numeric ID, and replace 'wpcf-the-end' with the slug of your end date field. Use the 'wpcf-' prefix here. 3. Add a standard filter to this View's Filter Controls and hide it with CSS. Example Category filter: <div class="form-group" style="display:none;"> <label>[wpml-string context="wpv-views"]Categories[/wpml-string]</label> [wpv-control-post-taxonomy taxonomy="category" type="select" url_param="wpv-category"] </div> Relevant Documentation:https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query |
2 | 7 | 7 years, 2 months ago | ||
How to customize error messages of the Toolset login and reset password links?
Started by: marcB-6
in: Toolset Professional Support
Problem: Solution: wpv_filter_override_auth_errors Example: add_filter( 'wpv_filter_override_auth_errors', 'custom_wpv_override_auth_errors', 30, 3 ); function custom_wpv_override_auth_errors( $message, $class = '', $code = '' ) { switch( $code ) { case 'invalid_key'; $message = __( 'CUSTOM VALUE', 'wpv-views' ); break; case 'invalidcombo'; $message = __( 'CUSTOM VALUE', 'wpv-views' ); break; } return $message; } Relevant Documentation: |
2 | 14 | 7 years, 2 months ago | ||
wpv-if not working with usermeta
1
2
Started by: marcB-6 in: Toolset Professional Support |
3 | 19 | 7 years, 2 months ago | ||
WPML toolset not working
Started by: marcB-6 in: Toolset Professional Support |
2 | 2 | 7 years, 2 months ago | ||
CRED Email notification does not support HTML after applying custom filter
Started by: marcB-6 in: Toolset Professional Support |
2 | 5 | 7 years, 3 months ago |