diyanK
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 |
---|---|---|---|---|---|
Latest versions break file upload via toolset forms on front-end
Started by: diyanK in: Toolset Professional Support |
2 | 2 | 1 year, 1 month ago | ||
Sorting a classic view table layout using a child post's Date custom field value
Started by: diyanK in: Toolset Professional Support |
2 | 3 | 1 year, 9 months ago | ||
Use my location stopped working
Started by: diyanK in: Toolset Professional Support |
2 | 3 | 1 year, 9 months ago | ||
Update-able web app distibution
Started by: diyanK in: Toolset Professional Support |
3 | 7 | 1 year, 9 months ago | ||
Change relationships per page in wp-admin
Started by: diyanK in: Toolset Professional Support |
2 | 4 | 2 years, 2 months ago | ||
Add custom field value to View Loop item contener
Started by: diyanK in: Toolset Professional Support |
2 | 7 | 2 years, 3 months ago | ||
Turn off automatic live preview for Toolset in Gutenberg
Started by: diyanK in: Toolset Professional Support |
2 | 2 | 2 years, 3 months ago | ||
Post Date field doesn’t output date format according to Site Language setting.
Started by: diyanK
in: Toolset Professional Support
Problem: Solution: [wpv-post-date format="F j Y"] Relevant Documentation: |
2 | 3 | 2 years, 6 months ago | ||
Record post relationship changes
Started by: diyanK in: Toolset Professional Support |
2 | 6 | 2 years, 6 months ago | ||
CRED Form returning AJAX Request Failed!
1
2
Started by: diyanK in: Toolset Professional Support |
2 | 20 | 3 years, 10 months ago | ||
Random order in a View/Block Editor/ creates a server feed loop.
Started by: diyanK
in: Toolset Professional Support
Problem: Setting random order in a View block causes constant updates in wp-admin editor page. Solution: Update to the latest version of Blocks/Views to get the fix for this issue. |
3 | 14 | 3 years, 11 months ago | ||
CRED checkbox validation fails after WP 5.6 update
Started by: diyanK in: Toolset Professional Support |
2 | 5 | 3 years, 11 months ago | ||
Content template "View with" issue
Started by: diyanK in: Toolset Professional Support |
2 | 6 | 4 years ago | ||
Delete related posts and their attachments when deleting parent post with cred-delete-post shortcode
Started by: diyanK
in: Toolset Professional Support
Problem: I would like to use a cred-delete-post shortcode to allow my visitors to delete a post on the front-end of the site. This post may be the parent of one or more child posts. When the parent post is deleted, I would like to delete its attachments, and its child posts as well as their attachments. Solution: Use the 'delete' action in the cred-delete-post shortcode, and customize the following code snippet to work with your post type slugs and post relationship slug. function delete_post_children($post_id) { global $wpdb; $post_type = get_post_type( $post_id ); if ( $post_type == 'products' || $post_type == 'profile') { $ids = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE post_parent = $post_id AND post_type = 'attachment'"); foreach ( $ids as $id ) { wp_delete_attachment($id, true); } if(has_post_thumbnail( $post_id )) { $tn_id = get_post_thumbnail_id( $post_id ); wp_delete_attachment($tn_id, true); } if( $post_type == 'profile' ) { // in this case, we want to force-delete the child product posts as well $profile_products = toolset_get_related_posts( $post_id, 'profile-product', [ 'query_by_role' => 'parent', 'role_to_return' => 'child', 'limit' => 10000, 'orderby' => null, ] ); foreach($profile_products as $profile_product ) { wp_delete_post( $profile_product, true ); } } } } add_action('before_delete_post', 'delete_post_children'); Relevant Documentation: |
2 | 12 | 4 years ago | ||
CRED custom taxonomy select option – empty items disappeared
Started by: diyanK in: Toolset Professional Support |
1 | 2 | 4 years ago |