Skip Navigation

[Resolved] Outputting a post (title) in relationship on a post (product) page

This support ticket is created 4 years, 10 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.

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Aditya Deshmukh 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1450227

Tell us what you are trying to do?
I'm developing a real estate website with Woocommerce Bookings (for adding properties and making them bookable) and Elementor Pro (for designing the single properties template) and Toolset (for custom post type). I have created custom Posts: 'Cities' and 'States,' linked them (with relationships) to the post type 'Products' (Properties) and created custom fields with Toolset for Product (properties). As I'm designing the single page template with Elementor, I can use dynamic fields to get the data from the toolset fields and taxonomies, but I can't get to output 'City' or 'State' which is linked to the properties.

Is there any documentation that you are following?
No.

What is the link to your site?
hidden link

#1450267

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to know are you using Toolset blocks or classic views to display your relationship field?

Can I have temporary admin access details so I can look at your structure and check whats going wrong and why the related post is not displayed?

However - I'm eager to know how you are trying to display the related posts? Using Types shortcode?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1450351

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Great. Thank you for sharing the access details.

You need to use the shortcode module to display the State and City using the Types shortcode. I've created the following content template to display the related state.
=> hidden link

I've added the following code to the shortcode module with your single elementor product template:

City: [wpv-post-title item="@city-property.parent"]
<br />

State: [wpv-post-body view_template="content-template-to-display-state" item="@city-property.parent"]

- You and adjust the code now and display the State and City wherever you want to display.

If you can check now: hidden link , you will find the City and state names just below the product title.

Here is the Doc that may help you in future:
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-fields-of-grandparents/#3-create-a-content-template-that-displays-grandparent-information

#1450461

My issue is resolved now. Thank you very much Minesh!