Thanks for sharing the solution.
Just in case you’d like to experiment a bit more with the layouts, here’s how Ihor’s first suggestion would look: Loom | Free Screen & Video Recording Software | Loom
I’ve added a listing attribute of type attachment and assigned it to the Page (Primary area).
If you do not plan to use the gallery at all, you can use the following snippet to hide the image slider on the listing page and display only the main image on the listing block [How to add custom code snippets - HivePress Help Center]:
add_filter('hivepress/v1/templates/listing_view_page/blocks', function ($blocks, $template){
$listing = $template->get_context( 'listing' );
$images = $listing->get_images();
if ( ! $listing || ! $images ) {
return $blocks;
}
hivepress()->template->fetch_block($blocks, 'listing_images');
return $blocks;
}, 1000, 2);
So the result will look like in my screenshot: the gallery will be removed from the single listing page, but the main image will still be displayed in the listing block (i.e. on archive pages where all listings are shown).
You can also style your attributes and turn them into buttons if needed. For example, for the website attribute, you can paste the following code into the display area of the attribute:
<a href="%value%" target="_blank" rel="nofollow" class="button button--large button--primary hp-button--wide weblinkbutton">
Website
</a>
In a similar way, you can also make numeric attributes clickable or styled as buttons, depending on your use case.
<a href="tel:%value%" class="hp-phone-link" rel="nofollow">
%value%
</a>
<a href="tel:%value%" rel="nofollow"
class="button button--large button--primary hp-button--wide hp-phone-button">
Call
</a>