Silvia
Support threads created in the last 30 days: 0
Favorite Forum Topics
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Help with migrating custom code provided by Support
Started by: Silvia
in: Toolset Professional Support
Problem: I have some post relationships custom code in place on my site, and the migration process indicates that it may cause problems. Solution: It's a good idea to check with support for migrating relationship code. This code should be okay, because we built in backwards compatibility for this particular case. |
2 | 5 | 6 years, 5 months ago | ||
Form notification to email from parent post field no longer working after Types 3.0 update
Started by: thomasD-2
in: Toolset Professional Support
Problem: I have a Form that triggers an email notification. I send the notification to an email address that is stored in a parent post's custom field, by using the CRED API cred_notification_recipients. Since updating to Types 3.0, the email notifications are not sent as expected. Solution: Update the code to work with the new Post Relationships API, and ensure the child post status is not "private". 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']) && 'Mail an Veranstalter' == $notification['name'] ) { // Add email recipient $parent_id = toolset_get_parent_post_by_type( $post_id, 'veranstaltung' ); $email_of_organizer = get_post_meta($parent_id, 'wpcf-veranstalter-email', true); $recipients[] = array( 'to' => 'cc', 'address' => '$email_of_organizer', 'name' => '', 'lastname' => '' ); } return $recipients; } Relevant Documentation: |
2 | 5 | 6 years, 6 months ago |
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Building an order form
1
2
Started by: Silvia in: Toolset Professional Support |
2 | 22 | 1 year, 2 months ago | ||
Create an image gallery from toolset image field In Breakdance Builder Template
Started by: Silvia in: Toolset Professional Support |
2 | 5 | 1 year, 5 months ago | ||
Name of relationship post alongside Post Title in pre-selected form field
Started by: Silvia in: Toolset Professional Support |
2 | 13 | 1 year, 6 months ago | ||
Highlight post in table view if the post has children in a specific relationship
Started by: Silvia in: Toolset Professional Support |
2 | 10 | 1 year, 8 months ago | ||
ODD TOOLSET BEHAVIOURS
Started by: Silvia in: Toolset Professional Support |
2 | 8 | 1 year, 8 months ago | ||
Adjust content of relationship field in cred form
Started by: Silvia in: Toolset Professional Support |
2 | 9 | 2 years, 7 months ago | ||
Sorting view results by parent custom field or parent post title
Started by: Silvia
in: Toolset Professional Support
Problem: Sort child posts by custom fields of parent post type. Solution: There isn't such kind of built-in feature within Toolset plugins, Toolset Blocks/Views plugins are using WordPress class WP_Query to query posts, see WP document: https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters ‘meta_value‘ – Note that a ‘meta_key=keyname‘ must also be present in the query. That means you can only sort the results by custom fields of post type(“Institutional position”) you are querying, you can not sort the result by custom fields of other post type(“People”). As a workaround, you can try with a nested views, for example: Relevant Documentation: |
2 | 13 | 2 years, 7 months ago | ||
Featured Image box disappeared
Started by: Silvia in: Toolset Professional Support |
3 | 14 | 2 years, 9 months ago | ||
Automatically set parent CPT when creating a new article
Started by: Silvia in: Toolset Professional Support |
1 | 2 | 3 years, 6 months ago | ||
View in Archive page not rendering when showing CPT results
Started by: Silvia in: Toolset Professional Support |
2 | 7 | 3 years, 10 months ago | ||
Include parent custom field value in form notification
Started by: Silvia
in: Toolset Professional Support
Problem: Solution: You can find the proposed solution in this case with the following reply: Relevant Documentation: |
2 | 5 | 3 years, 10 months ago | ||
Markers not appearing on map in Archive page (Real Estate Reference site)
Started by: Silvia in: Toolset Professional Support |
2 | 4 | 3 years, 10 months ago | ||
Filter a view by a custom field in the PARENT CPT
Started by: Silvia in: Toolset Professional Support |
2 | 3 | 4 years, 7 months ago | ||
PARENT_POST_TITLE not working in email send by form
1
2
Started by: Silvia
in: Toolset Professional Support
Problem: I would like to include the parent post title in an email notification triggered by a Form that creates private child posts. Unfortunately the %%PARENT_POST_TITLE%% placeholder is not working as expected. Solution: The best solution here is to create custom placeholders using the Forms API, and use the post relationships API in those placeholders to display information from the parent post. add_filter('cred_body_notification_codes', 'custom_generic_field_notification'); add_filter('cred_subject_notification_codes', 'custom_generic_field_notification'); function custom_generic_field_notification( $defaultPlaceHolders ) { $parent_id = $_REQUEST['@book-chapter_parent']; $newPlaceHolders = array( '%%FIXED_PARENT_TITLE%%' => get_the_title($parent_id), '%%FIXED_PARENT_LINK%%' => get_permalink($parent_id) ); return array_merge($defaultPlaceHolders, $newPlaceHolders ); } Then in your notification you can use them like other placeholders: Parent post title: %%FIXED_PARENT_TITLE%% Parent post link: %%FIXED_PARENT_LINK%% In your case you would change @book-chapter_parent to match your post relationship slug. Yours would be @tessuti_richiesta-info_parent. Notice that the "dot" usually seen in the post relationship slug is replaced with an underscore here. Relevant Documentation: |
2 | 17 | 4 years, 11 months ago | ||
Grant/revoke access to image visibility based on user
1
2
3
Started by: Silvia
in: Toolset Professional Support
Problem: Solution: The core idea of this code is explained here: |
2 | 35 | 4 years, 11 months ago |