How to retreive all images associated with the listing?

Hi HivePress Support,

I’m working on adding structured data (Schema.org) to my listings and need help retrieving all listing images, not just a single image.

I found your example for adding a single image:

However, I want to include all images associated with a listing, not just one.

How to retreive all images associated with the listing?

Thanks,

Jovica

Hi,

You can try this code to retrieve an array of image URLs:

$listing->get_images__url('large')

It’s also possible to request another image size in brackets Image Sizes in WordPress

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.