CPT template: Gallery from post's "image attachments"

Hello, Bricks team!

I am building a real estate portfolio on https://conrad.immo using the plugin, “WP-ImmoMakler”. It pulls in real estate property feeds from real estate software, which is placing the data in a directory on the server via FTP as zip files. The plugin crawls that folder and converts the delivered data into a CPT called, “Immobilie” (real estate property). They use a protocol called, “OpenImmo” for this.

The CPT is basically a huge collection of custom fields and, at the bottom, a section called, “image attachments”. I’ve never seen this in WordPress, so I’m thinking it’s a custom thing designed specifically for this CPT:

When building a template for that CPT, I can use the custom fields as dynamic data, but I can see no way to get to those attachments so I can display them as a gallery. The CPT circumvents the WP media library. The images are placed in an “uploads” subdirectory like this instead:

/wp-content/uploads/immomakler/attachments/d5355182a4d7f4b5c756916115249527/

The WP-ImmoMakler support team pointed me to this article:

They’re wondering if Bricks Ultimate’s “Product Galleries” query can be used as a loop to collect the attached images and feed them into a gallery. The point’s moot though since Bricks Ulitmate isn’t currently available for sale.

I’m thinking perhaps there’s another way to do this with a loop? Or a PHP snippet? Alternately, @higgin said in this post he was using a third-party gallery plugin to collect images into galleries, though his situation sounded a bit different than mine:

Any ideas would be highly appreciated.

Hi, how did you manage to create your slider with image attachements of your CPT ?

Hey, unfortunately, I couldn’t. I resorted to a solution provided by the plugin.

The WP-ImmoMakler plugin has a shortcode that pulls in a complete, ready-made archive page. Thankfully, it comes with a large number of customization options and I ended up doing the rest with my own CSS. This is the result.

1 Like