Luit
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 |
---|---|---|---|---|---|
No display options available in edit form
Started by: Luit in: Toolset Professional Support |
2 | 7 | 7 months ago | ||
wpv-login-form redirects to wp-login and not to the url set in the shortcode
Started by: Luit in: Toolset Professional Support |
2 | 2 | 8 months ago | ||
How to display only the custom fields for 1 post
Started by: Luit in: Toolset Professional Support |
1 | 1 | 8 months, 2 weeks ago | ||
I need some thoughts on filtering data
Started by: Luit in: Toolset Professional Support |
2 | 11 | 3 years, 8 months ago | ||
Delete child posts on deleting parent
Started by: Luit
in: Toolset Professional Support
Problem: The issue here is that the user wanted to delete their child posts once the parent is deleted on the frontend. Solution: add_action( 'before_delete_post', 'ts_before_delete_post', 1, 2 ); function ts_before_delete_post( $post_id, $post ){ if ( $post->post_type == 'persoon' && $post->post_status == 'publish' ) { $children = toolset_get_related_posts( $post_id,'relatie_personen_phvs',array('query_by_role' => 'parent','role_to_return' => 'child')); if ( is_array( $children ) ) { foreach ($children as $key => $child) { wp_delete_post( $child, true ); } } } } Add it to your Toolset custom code settings in Toolset->Settings->Custom Code. Ensure that you have activated it. Next you will need to replace 'persoon' with the Parent Post type and "relatie_personen_phvs" with the post relationship slug. This will ensure that the child posts are deleted when the parent is deleted. Finally this will only work if the action of the toolset delete button is set to 'delete'. This will not work when it is set to 'trash' |
2 | 11 | 3 years, 9 months ago | ||
uploading files
Started by: Luit in: Toolset Professional Support |
2 | 3 | 3 years, 9 months ago | ||
set variable with custom fields from child posts – comma separated and quotes
Started by: Luit in: Toolset Professional Support |
2 | 9 | 3 years, 9 months ago | ||
Create post title automatically based on custom field value
Started by: Luit in: Toolset Professional Support |
2 | 2 | 3 years, 9 months ago | ||
Get parent post id and meta field is not working in cred_save_data
Started by: Luit
in: Toolset Professional Support
Problem: I have a Form that is used to create child post in a one-to-many post relationship. I would like to get the value of a custom field from the related parent post in a cred_save_data callback, but it does not seem to be working. Solution: The relationship is not yet set in a cred_save_data hook, so you can either use the cred_submit_complete hook instead, or access the parent post ID directly from the parent select field in the $_POST superglobal. $parent_post_id = $_POST['@relationshipslug_parent']; $parent_field_value = get_post_meta( $parent_post_id, 'wpcf-fieldslug', true); |
2 | 8 | 3 years, 9 months ago | ||
Select categories and taxonomy based on url parameters
Started by: Luit in: Toolset Professional Support |
2 | 3 | 3 years, 11 months ago |