Skip Navigation

[Resolved] Past parent post title to CRED form

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user has a button on their parent post that can be used to navigate to the child post. This button is passing the url to the child page.

Solution:

In this case we can just use the shortcode.
[wpv-post-title id="[wpv-search-term param='parent_post_id']"]

Now this will only work if the parent id is being passed in the url

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Shane 5 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1186804

On parent post page, I have inserted child form button. So when users click on the button, they are redirected to the CRED form for creating child post under the parent post. So far so good!

Now, I want to be able to display some information about the parent post within the CRED form itself, so that users know what content they are creating for. Something like: "You are sharing your story about {parent post title}".

How can I achieve this?

#1186809

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dean,

If you send me a link to the parent post then I can show you exactly what is needed to be added on the child form to get this to display.

Thanks,
Shane

#1187240

Thank you Shane for looking into this!

Here's an example of parent post (using built-in Posts type):
hidden link
You can find the "Share your story" button right below the social sharing buttons.

#1188153

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dean,

Thank you.

Add this to your Toolset Form.

You are sharing your story about [wpv-post-title id="[wpv-search-term param='post_parent_id']"]

Please let me know if this helps.

Thanks,
Shane

#1188788
Image 2019-01-22 at 15.10.13.png

Hi Shane, the code doesn't work. It displays title of the form page instead, ie "Share your story related to Share your story"

I took a screenshot for you to see so you don't need to register/login to see it.

#1189008

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dean,

Would you mind providing me with access so that I can check on this in a bit more detail for you ?

Thanks,
Shane

#1189106

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dean,

I've fixed this for you and it should be working now.

Thanks,
Shane

#1189110

Thank you Shane! Curious to know what was wrong?

#1189175

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dean,

I realised that I provided the incorrect url parameter for the short.

I wrote post_parent_id when it should be parent_post_id

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.