Skip Navigation

[Résolu] RFG frontend edit: need help to show a title

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

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Waqar Il y a 2 années et 7 mois.

Assisté par: Waqar.

Auteur
Publications
#2333873

Hello,
we built a frontend page where our customer can list and edit Repeatable Fields Group.
In this page we show the main page title with [wpv-post-link item="[wpv-search-term param='wpv-relationship-filter']"]:
This is working well, so we get the post title (the room name) of the CPT ROOM.
This CPT has a relationship with the CPT HOTEL, so a single hotel can have more than 1 rooms and every room is owned by just one hotel.
What we need is print the hotel name, so we will have: HOTEL NAME > ROOM NAME.
Is this possible?
Thanks a lot!

#2334087

Hi,

Thank you for contacting us and I'd be happy to assist.

To suggest the best way to achieve this, I'll need to see how this page is set up in the admin area.

Can you please share temporary admin login details along with the link to a page where you'd like to show the parent hotel name/title?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2334527

Hello, thanks for the reply.
This is the link of a demo website your support collegue created for another problem:
lien caché

I have added a CPT Hotels and a CPT Rooms;

I have created a HOTEL post named Lorem Ipsum and assigned a ROOM post named My Windy Room:
lien caché

My Windy Room has a RFG and this is the frontend page where edit it:
lien caché

This page shows the ROOM page title by using this shortcode [wpv-post-link item="[wpv-search-term param='wpv-relationship-filter']"]

What we need is to also show the HOTEL NAME, so it should be print this:
Hotel Lorem Ipsum // My Windy Room

#2335089

Thank you for sharing these details.

Just as you're passing the ID of the parent "Room" post in the URL attribute "wpv-relationship-filter", you can also include the ID of the grandparent "Hotel" post in the URL attribute "hotel-id".

The updated link for the edit RFG page will look like this:


<a href="/edit-rfg-items-page/?wpv-relationship-filter=[wpv-post-id]&hotel-id=[wpv-post-id item='@hotel-room.parent']"> Edit RFG </a>

And then you can update the heading in the edit RFG page to include the hotel link, like this:


<h1> [wpv-post-link item="[wpv-search-term param='hotel-id']"] // [wpv-post-link item="[wpv-search-term param='wpv-relationship-filter']"] </h1>