davidL-10
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 |
---|---|---|---|---|---|
Date Format for User Custom Date Field
Started by: davidL-10 in: Toolset Professional Support |
2 | 11 | 2 years, 5 months ago | ||
Making the filter drop downs *Required
Started by: davidL-10
in: Toolset Professional Support
Problem: I have a custom search View with two control fields. I would like to require the User to select a value in both fields before any results are shown. As it is now, when the page loads all the results are shown. I would like to show no results. Solution: @e have an API that is helpful for this situation: wpv_filter_query_post_process. This will allow you to intercept the search results and test the query. If either option is blank, or 0, show no results. // custom filter that shows no search results if either filter is empty add_filter( 'wpv_filter_query_post_process', 'drop_empty_search_query_post_process', 10, 3 ); function drop_empty_search_query_post_process( $query, $view_settings, $view_id ) { $ids = array(12345); if (in_array($view_id, $ids)){ if ( // supplier type filter needs to check for not '0' as well as not empty ( isset($_GET['wpv-supplier-category']) && $_GET['wpv-supplier-category'] != '0' ) && // location filter needs to check for not '0' as well as not empty ( isset($_GET['wpv-area-served']) && $_GET['wpv-area-served'] != '0' ) ) { } else { $query->posts = array(); $query->found_posts = 0; $query->post_count = 0; } } return $query; } Replace 12345 with the numeric ID of this View. You can customize the "No results found" message in the View's Loop Output editor panel. Relevant Documentation: |
2 | 6 | 6 years, 6 months ago | ||
How would I set a click listener on each marker
Started by: davidL-10
in: Toolset Professional Support
Problem: I would like to know how to set a click listener on each Marker. Solution: You can access the Map Marker objects in JavaScript: WPViews.view_addon_maps.markers['yourMapID']. Here's a simple click handler example on a Marker object: |
2 | 3 | 6 years, 8 months ago | ||
Delete post when WooCommerce Subscription expires or is canceled
Started by: davidL-10
in: Toolset Professional Support
Problem: I would like to delete a post when a User's WooCommerce Subscription is canceled or expires. Solution: Toolset does not have any hooks that will help you respond to WooCommerce Subscription events, so I would ask WooCommerce Subscriptions' support team if they offer an API that will allow you to perform some action when a subscription is canceled or expires. If so, then you can use some custom code to set the post to "draft" status, which would effectively remove it from the front-end of the site. You could reinstate the post at any time if the subscription is renewed. Here's an example ticket on stackoverflow that modifies a post's status: |
2 | 2 | 6 years, 8 months ago | ||
Register + Pay = Wrong User type & Custom function Fails
Started by: davidL-10 in: Toolset Professional Support |
2 | 7 | 6 years, 8 months ago | ||
Problems after going Live
Started by: davidL-10 in: Toolset Professional Support |
2 | 3 | 7 years ago | ||
Cred Form associating with CPT
Started by: davidL-10
in: Toolset Professional Support
Problem: Solution: You can find the proposed solution in this case with the following reply: Relevant Documentation: |
2 | 8 | 7 years ago | ||
Adding Testimonials (New child posts) to Existing Bands
Started by: davidL-10 in: Toolset Professional Support |
2 | 6 | 7 years, 1 month ago |