diyanK
Admite hilos creados en los últimos 30 días: 1
Debates favoritos del foro
Este usuario no tiene debates favoritos.
Temas del foro creados
Status | Debate | Supporter | Voces | Mensajes | Caducidad |
---|---|---|---|---|---|
CRED custom taxonomy select option – empty items disappeared
Iniciado por: diyanK en: Toolset Professional Support |
1 | 2 | hace 4 años, 3 meses | ||
Prevent wpcf_ images from being generated on new gallery block.
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 7 | hace 4 años, 4 meses | |
Email notifications body encoding issue
1
2
3
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 41 | hace 4 años, 9 meses | |
Delete images from server after front-end CRED Form update
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 8 | hace 4 años, 10 meses | |
Back-end editing resets my multiple checkbox custom fields.
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 2 | hace 5 años, 2 meses | |
Repeat a content template X times based on CPT value.
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 4 | hace 5 años, 8 meses | |
Types 3.3 gallery implementation help.
Iniciado por: diyanK
en: Toolset Professional Support
Problem: I am using "Using Views shortcode to display images as a gallery" method because I am editing a Layout that acts as a template for the CPT-single pages. Unfortunately it returns nothing for me and I cannot find out the reason. Solution: Types plugin will pre-pend slug "wpcf-" before field slug, so in database, the meta_key value is "wpcf-data-photo", and in [wpv-for-each] shortcode, you will need to use the real field slug "wpcf-data-photo", like this: https://toolset.com/forums/topic/types-3-3-gallery-implementation-help/#post-1242823 Relevant Documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/ |
|
2 | 3 | hace 5 años, 9 meses | |
Is it possible to change the font size of text within a cluster marker?
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 6 | hace 5 años, 9 meses | |
Delete custom upload folder when Form is submitted successfully
Iniciado por: diyanK
en: Toolset Professional Support
Problem: I have a Form that should delete Users. Each User has a custom upload directory. I would like to also delete that custom upload directory. Solution: Use the cred_submit_complete hook to tap into that deletion event and trigger your own directory removal code. add_action('cred_submit_complete', 'my_success_action',10,2); function my_success_action($post_id, $form_data) { // if a specific form if ($form_data['id']==12) { // user id = $post_id; } } Relevant Documentation: |
|
2 | 14 | hace 5 años, 11 meses | |
Front-end delete account function pt.2
Iniciado por: diyanK
en: Toolset Professional Support
Problem: I would like to use a Form to delete a User. When the Form is submitted successfully, I would like to send an email to that User's address. Solution: Add a generic hidden field to the Form and call it something like "generic-email-field". Set the value to be the current User's email, like this: [cred_generic_field type='hidden' field='generic-email-field'] { "required":0, "validate_format":0, "default":"[wpv-user field='user_email']" } [/cred_generic_field] Then in the notification settings, I would choose "Send notification to a specific email address" and enter something like support@yoursite.com, where all these messages will be sent. Then you can use the cred_notification_recipients API to add the generic field address as a CC, like this: add_filter('cred_notification_recipients', 'modify_recipients', 10, 4); function modify_recipients($recipients, $notification, $form_id, $post_id) { // Check notification name matches target notification if ( isset($notification['name']) && 'Your notification name' == $notification['name'] ) { // Add a CC to the generic email address $recipients[] = array( 'to' => 'cc', 'address' => $_POST['generic-email-field'], 'name' => '', 'lastname' => '' ); } return $recipients; } Change Your notification name to match your notification name. Relevant Documentation: |
|
2 | 3 | hace 5 años, 11 meses | |
Option to show message after form submission doesn't do anything
Iniciado por: diyanK en: Toolset Professional Support |
|
2 | 3 | hace 5 años, 11 meses | |
Success message on redirect page after form submission
Iniciado por: diyanK
en: Toolset Professional Support
Problem: I would like to redirect to the homepage after submitting a Form, and I would like to display a success message there. Solution: You could append a special URL parameter to the redirection URL, then use conditional HTML on your homepage template to display a notice. To append a URL parameter to the redirection URL, you must set up the Form to redirect to some page. It doesn't matter which page, we will override that in code. function tssupp_delete_user_redirect( $url, $post_id, $form_data ){ if ( 123 == $form_data['id'] ) { $url = 'https://yoursite.com/?user-deleted=1'; } return $url; } add_action( 'cred_success_redirect', 'tssupp_delete_user_redirect', 10, 3 ); Replace 123 with the numeric ID of the delete User Form. Your visitor will be redirected to the homepage with the URL parameter added. Then in your homepage template you can display the message using conditional HTML: [wpv-conditional if="( '[wpv-search-term param="user-deleted"]' eq '1' )"] Your account has been deleted. [/wpv-conditional] Relevant Documentation: |
|
2 | 3 | hace 5 años, 11 meses | |
Help me get select custom field «display text» into post title.
Iniciado por: diyanK
en: Toolset Professional Support
Problem: I have a custom select field that stores the values 1, 2 and 3 but has different text labels. I would like to display the selected text label using PHP. Solution: $type = types_render_field( "analysis-type", array( "id" => $post_id ) ); Relevant Documentation: |
|
2 | 3 | hace 5 años, 11 meses | |
Delete post attachments when deleting post with cred_delete_post_link
Iniciado por: diyanK
en: Toolset Professional Support
Problem: I am using cred_delete_post_link to delete posts on the front-end of the site. I would like to delete all the images attached to the post as well, including the featured image and posts added to post content. Solution: You can use some custom code to delete the attachments: function delete_post_children($post_id) { global $wpdb; if ( get_post_type( $post_id ) == 'bag' ) { $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); } } } add_action('before_delete_post', 'delete_post_children'); Relevant Documentation: |
|
2 | 8 | hace 5 años, 12 meses |