diyanK
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é |
---|---|---|---|---|---|
Prevent wpcf_ images from being generated on new gallery block.
Commencé par : diyanK in: Toolset Professional Support |
2 | 7 | Il y a 4 années et 1 mois | ||
Email notifications body encoding issue
1
2
3
Commencé par : diyanK in: Toolset Professional Support |
2 | 41 | Il y a 4 années et 7 mois | ||
Delete images from server after front-end CRED Form update
Commencé par : diyanK in: Toolset Professional Support |
2 | 8 | Il y a 4 années et 7 mois | ||
Back-end editing resets my multiple checkbox custom fields.
Commencé par : diyanK in: Toolset Professional Support |
2 | 2 | Il y a 4 années et 11 mois | ||
Repeat a content template X times based on CPT value.
Commencé par : diyanK in: Toolset Professional Support |
2 | 4 | Il y a 5 années et 5 mois | ||
Types 3.3 gallery implementation help.
Commencé par : diyanK
in: 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 | Il y a 5 années et 6 mois | ||
Is it possible to change the font size of text within a cluster marker?
Commencé par : diyanK in: Toolset Professional Support |
2 | 6 | Il y a 5 années et 6 mois | ||
Delete custom upload folder when Form is submitted successfully
Commencé par : diyanK
in: 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 | Il y a 5 années et 8 mois | ||
Front-end delete account function pt.2
Commencé par : diyanK
in: 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 | Il y a 5 années et 8 mois | ||
Option to show message after form submission doesn't do anything
Commencé par : diyanK in: Toolset Professional Support |
2 | 3 | Il y a 5 années et 8 mois | ||
Success message on redirect page after form submission
Commencé par : diyanK
in: 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 | Il y a 5 années et 8 mois | ||
Help me get select custom field « display text » into post title.
Commencé par : diyanK
in: 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 | Il y a 5 années et 8 mois | ||
Delete post attachments when deleting post with cred_delete_post_link
Commencé par : diyanK
in: 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 | Il y a 5 années et 9 mois | ||
Help me update my website to latest versions of Toolset plugins.
Commencé par : diyanK
in: Toolset Professional Support
Problem: I would like to update my website to use the new post relationships features, but I'm seeing some error messages and my Forms stopped working as expected. Solution: Turning off AJAX submission seems to have resolved the Forms submission issues. You can inspect each post relationship migration message for additional information about what's happening. In this case, it appears that the messages do not indicate any serious problems. The logs are quite detailed for debugging purposes, but these messages all seem to indicate posts that were deleted or old relationships that do not need to be migrated. |
3 | 10 | Il y a 6 années et 4 mois | ||
Help with conditional targeting only part of a date field.
Commencé par : diyanK
in: Toolset Professional Support
Problem: I have two custom date fields, one for the start date and one for the end date. If both dates are populated, and they both exist in the same months, then I want to display the date range like 1 - 4 June 2018. If the start and end dates fall in different months, then I want to show them like 28 June - 7 July 2018. So I need to be able to target the month name in a conditional. Solution: [types field='event-starts-date' format='F'][/types] You can test those formatted custom field values in a conditional: [wpv-conditional if="( '[types field='event-starts-date' format='F'][/types]' eq '[types field='event-end-date' format='F'][/types]' )" evaluate="false"] Start and end date months do not match, so output the first month name here. [/wpv-conditional] Relevant Documentation: |
2 | 3 | Il y a 6 années et 5 mois |