Skip Navigation

[Resolved] Displaying Fields of grand grandparent

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

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/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by RaulS6474 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#1555273

Hi,
I've being following instructions for grandparent and worked fine https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-fields-of-grandparents/

Now I need to also show grand grandparent, so I have nested a template into grandparent template, but it do not appear — I am going fine there?

View child template:
<div class="block [wpv-post-taxonomy type='ofreces-buscas' format='slug'] [wpv-post-taxonomy type='profesional-aficionado' format='slug'] [wpv-post-taxonomy type='remunerado-gratuito' format='slug']"><h3>[wpv-post-link]</h3>
<p>[wpv-post-link item="@codigo-postal-anuncio.parent"] ([wpv-post-body view_template="parent-mostrar-municipio-y-provincia" item="@codigo-postal-anuncio.parent"]) — [wpv-post-author format="link"]</p></div>

Grandparent template:
[wpv-post-link item="@municipio-codigo-postal.parent"], [wpv-post-body view_template="partent-mostrar-provincia" item="@provincia-municipio.parent"]

Grand grandparent template:
[wpv-post-link item="@provincia-municipio.parent"]

Thanks

#1555807

Hello,

Since I don't know how do you setup those post type relationship slugs and content template slugs, I don't see any wrong in your codes, I suggest check these in your codes:
- content template slugs
- the post type relationship slugs

And in the Grand grandparent template you mentioned above:
[wpv-post-link item="@provincia-municipio.parent"]

It should be without "item" attribute, like below:
[wpv-post-link]

If you need more assistance for it, please provide a test with same problem, also point out the problem page URL and conten template URLs. I need to test and debug in a live website.

#1560075
5 - FRONT.png
3 - grandparent.png
2 - parent.png
1 - card content template.png
0 - view.png

hi Luo,
the site is on localhost, so I atached screenshots for:

0 - the view where is displayed the card
5 - frontend (check message «««« Here goes grandparent »»»
1 - card template
2 - parent template
3 - grandparent template

#1560945

Thanks for the details, but I still did not see the post type relationship settings, for example, any typo in those shortcodes will conduct the problem you mentioned above.

Please follow our document to provide a copy of your website in below private message box, also point out the problem page URL and conten template URLs, I need to test it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
You can put the duplictor package file in your own google drive disk, and share the link.

#1567513

Thanks for the details, I am downloading the files, will update here if there is anything found

#1567553

Here are what I found, I assume we are talking about these:
1) problem page is the home page
2) the post view is "Todos los anuncios"
The post types are below:
- Grandparent "Municipios"
- Parent "Códigos postales"
- Child "Anuncios"

Please check the post type relationship between "Municipios" and ""Códigos postales"", the relationship slug is "municipio-codigo-postal", so you can edit the content template "Parent - mostrar municipio y provincia":
hidden link

replace the content template shortcode from:
[wpv-post-body view_template="parent-mostrar-provincia" item="@provincia-municipio.parent"]

To:
[wpv-post-body view_template="parent-mostrar-provincia" item="@municipio-codigo-postal.parent"]

And test again.

If you want to display the grand-grand-parent "provincia" post information, you can edit the content template "Patent - mostrar provincia", add below shortcode:
[wpv-post-link item="@provincia-municipio.parent"]

#1568399

Thanks a lot!!!

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