Skip Navigation

[Résolu] How can I get the id of the container page inside a child post create/edit form

This support ticket is created Il y a 4 années et 3 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Marqué : 

This topic contains 3 réponses, has 2 voix.

Last updated by Shane Il y a 4 années et 3 mois.

Assisted by: Shane.

Auteur
Publications
#1455971

there is nothing more than what already ask in the subject.
Thanks in advance

#1456387

Shane
Supporter

Languages: Anglais (English )

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

Hi Carletto,

Thank you for getting in touch.

If the form is on the parent page then you should just be able to use this [wpv-post-id] it will get the ID of the page that the form is on.

Thanks,
Shane

#1456539

Hi Shane,

thanks for your reply.
So what if I'd like to show the child ID in the edit form that also seat in the parent page?

The parent template loads a view that checks for a child.
If the child is found the view loads the edit form whether if it isn't the view loads the create form

While in the creation form the post ID of the child doesn't exist in the edit form it exist and I'd like to display it to the user.

#1456667

Shane
Supporter

Languages: Anglais (English )

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

Hi Carletto,

In this case you wouldn't be able to show the Child ID in the form itself, you will need to add the [wpv-post-id] to the view that is looking for the child post.

If you want to display the ID of the current page within the view then you must do this [wpv-post-id item= "$current_page"]

Please let me know if this helps.
Thanks,
Shane

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