Problem:
Use %POST_PARENT_TITLE%% in the CRED notification subject line or even the notification body to show the parent post title but it doesn't work.
Solution:
I am not able to reproduce this issue at my end with ALL latest version of Toolset plugins.
%%POST_PARENT_TITLE%% working fine in Notification email subject and Body.
Alternatively if its not working for you you can try below method to forcefully display Parent post title:
1. In your CRED form, add a generic field by pasting this shortcode:
[cred_generic_field field='currentpagetitle' type='hidden' class='' urlparam=''] { "required":0, "validate_format":0, "persist": 1, "default":"[wpv-post-title]" } [/cred_generic_field]
2. Add this code in your theme’s or child theme’s functions.php file:
// custom cred notification placeholders add_filter('cred_body_notification_codes', 'custom_generic_field_notification2'); add_filter('cred_subject_notification_codes', 'custom_generic_field_notification2'); function custom_generic_field_notification2( $defaultPlaceHolders ) { $newPlaceHolders = array( '%%FORCED_PARENT_TITLE%%' => $_REQUEST['currentpagetitle'], ); return array_merge($defaultPlaceHolders, $newPlaceHolders ); }
3. Then in your email notification, add Parent post title using this shortcode:
%%FORCED_PARENT_TITLE%%
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
This topic contains 2 replies, has 2 voices.
Last updated by samB-3 6 years, 5 months ago.
Assisted by: Noman.