Skip Navigation

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

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

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

Last updated by Waqar Il y a 2 années.

Assisted by: 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

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

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:
hidden link

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:
hidden link

My Windy Room has a RFG and this is the frontend page where edit it:
hidden link

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

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

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>

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