Skip Navigation

[Resolved] Parent view not rendering on frontend

This thread is resolved. Here is a description of the problem and solution.

Problem:
Parent view not rendering on frontend - how to display parent post image

Solution:
To display parent custom field image in one-to-many relationship you can display it directly using image block. You can add the image block and selected the parent post.

Relevant Documentation:
- https://toolset.com/block-item/image/

This support ticket is created 2 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.

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 6 replies, has 2 voices.

Last updated by nicolaS-3 2 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2262073

Hi
I am developing a classified site and I want to show the user/author picture and caption on each single classified page. I have a one-to-many relationship between the (user) profile and cassifieds CPTs. In the classified single content template I have created a view to show the author user image and caption. The view works fine in the editor but it's not rendered on the page. If I inspect the page code I can see that the view code is there, but the block it's empty. Same on PC or iPAD. I am not using any caching. My theme is Kadence free.
Am I missing anything ?
Thanks

#2262439

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

That is strange. Can I have a admin access details so I can check whats going wrong with your setup as well as problem URL where I can see the issue.

*** 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.

#2262577

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

To display parent custom field in one-to-many relationship you can display it directly using image block. I've added the image block and selected the parent post field and as you can see with the above link it does display correct output.

You can just remove the view you added to display image custom field from parent post and instead of that you can use the image block.
hidden link

#2262593

Minesh
Supporter

Languages: English (English )

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

Do you see it working?

#2262597

Hi,
now I can see the user picture but it's always the same across all classifieds, it isn't the image of the correct parent user, pls check thanks

#2262601

Minesh
Supporter

Languages: English (English )

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

Can you please check now:
- hidden link
- hidden link

I can see different images, you just need to add image block outside the view's loop. I've also removed the view's block you added to display the image: hidden link

I can see its working as expected. Can you please confirm it works at your end as well.

#2262607

My issue is resolved now. Thank you!