davidL-10
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Date Format for User Custom Date Field
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 11 | Il y a 1 an et 8 mois | ||
Making the filter drop downs *Required
Commencé par : 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 | Il y a 5 années et 9 mois | ||
How would I set a click listener on each marker
Commencé par : 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 | Il y a 5 années et 11 mois | ||
Delete post when WooCommerce Subscription expires or is canceled
Commencé par : 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 | Il y a 5 années et 11 mois | ||
Register + Pay = Wrong User type & Custom function Fails
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 7 | Il y a 5 années et 11 mois | ||
Problems after going Live
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 3 | Il y a 6 années et 3 mois | ||
Automatically create a custom post during User registration with CRED and restrict access
Commencé par : davidL-10
in: Toolset Professional Support
Problem: I have a new User CRED form that allows guests to register. When they submit the form, I would like to automatically create a custom post that includes information from the form, and I would like to restrict access to that post to the created member only. Solution: add_action('cred_save_data', 'my_save_data_action',10,2); function my_save_data_action($post_id, $form_data) { if ($form_data['id']==1234) { $my_post = array( 'post_title' => $_POST['some_custom_input'], 'post_status' => 'publish', 'post_author' => $post_id, 'post_type' => 'band-post-type-slug' ); // Insert the post into the database wp_insert_post( $my_post ); } } 1234 should be changed to match the numeric ID of your User CRED form, and 'some_custom_input' should be changed to match the name of an input containing the data you would like to use in the Band post title. The data in the $my_post array can be modified according to the wp_insert_post documentation. 2. Only allow the registered Member edit his own Band Page. Relevant Documentation: |
2 | 6 | Il y a 6 années et 4 mois | ||
Cred Form associating with CPT
Commencé par : 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 | Il y a 6 années et 4 mois | ||
Adding Testimonials (New child posts) to Existing Bands
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 6 | Il y a 6 années et 4 mois | ||
Hi, Im trying to create a set of tabbed content.
Commencé par : davidL-10 in: Toolset Professional Support |
1 | 2 | Il y a 6 années et 5 mois | ||
Maps ok in admin – not ok on front end
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 3 | Il y a 7 années et 3 mois | ||
3rd party database
Commencé par : davidL-10
in: Toolset Professional Support
Problem: Solution: This is because our plugins utilize wordpress native db query function in order to query the database. This function only queries the tables within the current database that the installation lives in. It is not able to perform cross database queries. Any such functionality would require the use of custom coding as you currently tried. This is something that is out of the capabilities of our Toolset plugins. |
2 | 3 | Il y a 7 années et 12 mois | ||
Monetising a Directory Site
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 2 | Il y a 8 années et 2 mois | ||
Custom Fields have disappeared from the Posts the are assigned to in ADMIN
Commencé par : davidL-10 in: Toolset Professional Support |
2 | 3 | Il y a 8 années et 4 mois | ||
How Do I specify a separate database?
Commencé par : davidL-10 in: Toolset Professional Support |
3 | 4 | Il y a 9 années et 3 mois |