Skip Navigation

[Resolved] View with multiple content types and would like to use an image field

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

Problem:
The user has a view that queries multiple custom post types. He would like to display an image for each post. The image is stored in a different custom field for each custom post type.

Solution:
You can use conditional blocks inside the loop to display different custom fields/blocks/ or even content templates for each type of post the view outputs. This way you can configure different custom fields for the image depending on the current post in the loop.

This support ticket is created 4 years, 11 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
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: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by philipF-5 4 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1675235

Tell us what you are trying to do? I created a view that has many content types in it, then in the view I created an image background on a container that draws from a dynamic image field. However, that only works for one content type since I can only select one dynamic field from one of the content types.

So I guess I have two questions:
Is there a way to create a view where each result draws in the image from a separate dynamic image field?

Or is there a way to share an image field across many different content types?

#1675325

Hello and thank you for contacting the Toolset support.

You can use conditional blocks inside the loop to display different custom fields/blocks/ or even content templates for each type of post the view outputs. This way you can configure different custom fields for the image depending on the current post in the loop.

I hope this helps. Let me know if you have any questions.

#1675755

My issue is resolved now. Thank you!