Skip Navigation

[Gelöst] RFG frontend edit: need help to show a title

This support ticket is created vor 2 Jahre, 6 Monate. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 2 Jahre, 6 Monate.

Assistiert von: Waqar.

Author
Artikel
#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:
versteckter 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:
versteckter Link

My Windy Room has a RFG and this is the frontend page where edit it:
versteckter 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

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>

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.