Problem:
We are creating Child Posts with a Toolset Form and want to display the parent posts data (title) when we show the form on the front end so we can display a message like below:
You are entering data for
.
Solution:
You can use different solutions but none is a native solution.
You can use either the deprecated - but still working for one to many relationships) ShortCodes as below:
[cred-post-parent get='title'] //Title of parent [cred-post-parent get='url'] //URL of parent
OR, you can nest ShortCodes, which is also something that may stop working at some point in future, as WordPress does not like nested shortcodes - however it should proceed to work in Toolset Forms and Views as long the block editor is not used:
https://toolset.com/forums/topic/past-parent-post-title-to-cred-form/
https://toolset.com/forums/topic/displaying-data-from-parent-post-type-in-cred-form/
Another approach could be to create a custom code with the above principles and output the title, so no nesting is necessary.
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.
Our next available supporter will start replying to tickets in about 2.20 hours from now. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 2 replies, has 2 voices.
Last updated by 4 years, 10 months ago.
Assisted by: Beda.